/* ==========================================================================
   RESET & STYLES GÉNÉRAUX
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111111;
  background-color: #ffffff;
  line-height: 1.6;
  width: 100%;
  max-width: 1400px;
  padding: 0 40px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   GESTION DES FONDS DE PAGE
   ========================================================================== */
/* Fond général par défaut */
body {
  background-image: url('../images/fd-vitrail.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
}

/* Fond spécifique : Page À Propos */
body.page-a-propos {
  background-image: url('../images/fd-a-propos.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
}

/* Fond spécifique : Page d'accueil (Image zoomée, opacité 50%, sans scroll) */
body.home-landing {
  background-image: none;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

body.home-landing::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/fd-accueil.JPG');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.55;
  transform: scale(1.08);
  z-index: -1;
}

/* ==========================================================================
   EN-TÊTE & NAVIGATION
   ========================================================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 50px;
  width: 100%;
}

.brand a {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 35px;
}

nav ul li {
  position: relative;
}

nav ul li > a {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
  position: relative;
  display: inline-block;
  padding: 0 0 4px 0;
}

nav ul li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #111111;
  opacity: 0;
  transition: opacity 0.3s ease;
}

nav ul li:hover > a::after {
  opacity: 1;
}

nav ul li a:hover {
  color: #666666;
}

/* SOUS-MENUS DÉROULANTS */
nav ul li .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: transparent;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 0;
  border-top: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}

nav ul li:hover .submenu {
  opacity: 1;
  visibility: visible;
}

nav ul li .submenu a {
  font-size: 0.95rem;
  white-space: nowrap;
  color: #444444;
  padding-bottom: 0;
}

nav ul li .submenu a::after {
  display: none;
}

nav ul li .submenu a:hover {
  color: #000000;
}

/* ==========================================================================
   CONTENU PRINCIPAL
   ========================================================================== */
main {
  margin-bottom: 80px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

.page-header {
  width: 100%;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-header p,
.page-header .intro-text p {
  color: #666666;
  font-size: 1.05rem;
  width: 100%;
  max-width: 750px;
  margin-bottom: 15px;
}

/* ==========================================================================
   PAGE D'ACCUEIL (DISPOSITION BAS ET FER À DROITE)
   ========================================================================== */
.home-main-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(100vh - 150px);
  padding-bottom: 30px;
  margin-bottom: 0;
}

.home-bottom-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

/* Logo gauche */
.logo-left-box img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* Colonne droite complète (Fer à droite) */
.home-right-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 20px;
}

/* Bloc d'informations textuelles */
.home-info-block h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #111111;
}

.home-info-block .activites {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #111111;
}

.home-info-block .since {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 12px;
}

.home-info-block .address {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #111111;
}

.home-info-block .contact-links {
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-info-block .contact-links a:hover {
  color: #555555;
}

/* Logo droit */
.logo-right-box img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   PHOTO PRINCIPALE ACCUEIL (HERO)
   ========================================================================== */
.hero-image-container {
  width: 100%;
  margin-bottom: 60px;
}

.hero-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  background-color: #f9f9f9;
  cursor: zoom-in;
}

.hero-caption {
  margin-top: 15px;
}

.hero-caption h3 {
  font-weight: 400;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-caption p {
  color: #888888;
  font-size: 0.85rem;
  margin-top: 3px;
}

/* ==========================================================================
   GRILLE PORTFOLIO
   ========================================================================== */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  width: 100%;
}

.artwork-item {
  display: flex;
  flex-direction: column;
  width: calc((100% - 80px) / 3);
  box-sizing: border-box;
}

.artwork-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.artwork-item img:hover {
  opacity: 0.9;
}

.artwork-item .caption {
  margin-top: 15px;
}

.artwork-item .caption h3 {
  font-size: 1rem;
  font-weight: 500;
}

.artwork-item .caption p {
  font-size: 0.85rem;
  color: #777777;
  margin-top: 2px;
}

/* ==========================================================================
   PAGES RUBRIQUES / LISTE D'ITEMS
   ========================================================================== */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.item-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 30px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.item-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-info {
  width: 45%;
}

.item-info h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.item-subtitle {
  display: inline-block;
  font-size: 0.85rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
}

.item-description {
  font-size: 0.95rem;
  color: #444444;
  line-height: 1.7;
}

.item-photos {
  width: 50%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;
}

.item-photos img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* ==========================================================================
   PAGE À PROPOS
   ========================================================================== */
.about-container {
  display: block;
  max-width: 800px;
  margin-top: 40px;
}

.about-text {
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.6;
}

.about-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.about-image-wrapper {
  margin: 20px 0;
}

.about-section {
  margin-top: 20px;
}

.about-section h4 {
  margin-top: 15px;
  margin-bottom: 8px;
}

.about-contact-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.about-contact-block .author-name,
.about-contact-block .since,
.about-contact-block .address {
  margin-bottom: 10px;
}

.section-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 60px 0;
}

/* ==========================================================================
   BANDEAU COOKIES
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #111111;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cookie-banner p {
  font-size: 0.85rem;
  color: #333333;
  margin: 0;
  line-height: 1.4;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

.btn-cookie {
  padding: 8px 16px;
  font-size: 0.8rem;
  border: 1px solid #111111;
  cursor: pointer;
  background: transparent;
}

.btn-accept {
  background: #111111;
  color: #ffffff;
}

.btn-refuse {
  color: #111111;
}

/* ==========================================================================
   POP-UP / MODALE LIGHTBOX
   ========================================================================== */
dialog#image-modal {
  border: none;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  outline: none;
  overflow: visible;
  padding: 0;
}

dialog#image-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-wrapper {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
}

#modal-img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  user-select: none;
  z-index: 10;
}

.close-modal:hover {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

/* ==========================================================================
   PIED DE PAGE CLASSIQUE
   ========================================================================== */
footer {
  padding: 40px 0;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888888;
}

/* ==========================================================================
   RESPONSIVE (MOBILES & TABLETTES)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding: 0 20px;
  }

  body.home-landing {
    height: auto;
    overflow-y: auto;
  }

  .home-main-wrapper {
    height: auto;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 15px;
  }

  .artwork-item {
    width: 100%;
  }

  .hero-image {
    max-height: 350px;
  }

  .item-card {
    flex-direction: column;
  }

  .item-info,
  .item-photos {
    width: 100%;
  }

  footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .home-bottom-layout {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .home-right-column {
    align-items: center;
    text-align: center;
  }

  .logo-left-box img,
  .logo-right-box img {
    max-height: 90px;
  }
}

/* Décalage des logos de 75px vers le haut */
.logo-left-box,
.logo-right-box {
  transform: translateY(-75px);
}

/* Décalage du bloc texte vers le haut */
.home-info-block {
  transform: translateY(-100px);
}

/* Footer noir uniquement sur la page d'accueil */
body.home-landing footer,
body.home-landing footer p,
body.home-landing footer a {
  color: #000000 !important;
}

body.home-landing footer a:hover {
  color: #555555 !important;
}

/* Ombrage doux sur les logos de l'accueil */
body.home-landing .logo-left-box img,
body.home-landing .logo-right-box img {
  filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.25));
  transition: filter 0.3s ease;
}

/* Accentuation légère au survol */
body.home-landing .logo-left-box img:hover,
body.home-landing .logo-right-box img:hover {
  filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.50));
}

/* Interlettrage accentué pour les grands titres de toutes les pages */
h1, 
.page-header h1, 
.home-info-block h1 {
  letter-spacing: 0.05em; /* Ajuste cette valeur selon l'effet souhaité (ex: 0.12em ou 0.2em) */
}

/* SUR GRAND ÉCRAN : Bloque la barre de défilement et étire le fond */
html:has(body.home-landing) {
  overflow-y: hidden !important;
}

/* SUR MOBILE (< 768px) : Réautorise le scroll et réadapte l'affichage */
@media (max-width: 768px) {
  html:has(body.home-landing) {
    overflow-y: auto !important;
  }

  body.home-landing {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
  }

  body.home-landing::before {
    position: fixed; /* Garde le fond fixe pendant le scroll mobile */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
  }
}

/* ==========================================================================
   CONTRÔLE DES COULEURS DU BLOC INFOS (INDEX)
   ========================================================================== */

/* 1. Titre principal : SL ARCHITECTURE D'ART VERRIER */
.home-info-block .titre-principal,
.home-info-block h1 {
  color: #111111 !important; /* Modifier la couleur ici */
}

/* 2. Sous-titre : Création de vitraux — Verrerie d'art — Ferronnerie */
.home-info-block .activites {
  color: #FFFFFF !important; /* Modifier la couleur ici */
}

/* 3. Date : Entreprise fondée en 2004 */
.home-info-block .since {
  color: #111111 !important; /* Modifier la couleur ici */
}

/* 4. Adresse : 23, rue des Gravottes 02540 VENDIÈRES */
.home-info-block .address {
  color: #FFFFFF !important; /* Modifier la couleur ici */
}

/* 5. Liens de contact : Email et Téléphone */
.home-info-block .contact-links a {
  color: #111111 !important; /* Couleur par défaut */
  transition: color 0.2s ease;
}

/* Couleur des liens au survol de la souris */
.home-info-block .contact-links a:hover {
  color: #FFFFFF !important; 
}