/* =====================================================================
   Compléments à la charte d'origine (style.css + extra.css) pour les
   éléments apportés par le back-office et absents du site d'origine :
   pop-up, bloc Texte simple, Tableau comparatif, blog, vignettes de
   galerie avec photo. Mêmes tokens (--bordeaux, --ink, --paper…).
   ===================================================================== */

/* ---------- Contraste : doré sur fonds sombres (2026-10-10) ----------
   Le bordeaux de la charte (#6b1212) est illisible sur les fonds sombres
   (contraste 1,5:1, minimum WCAG 4,5:1). Sur ces fonds, les accents
   passent en doré (--gold, 8,7:1 sur #171310). Le bordeaux reste
   inchangé sur les fonds clairs. Audit automatisé de toutes les pages :
   plus aucun texte sous le seuil. */
:root { --gold: #c9a96e; }
.section--dark em,
.section--dark cite,
.section--dark .value-item__num,
.contact__card .arrow { color: var(--gold); }
/* Cartes de contact : toujours sur fond sombre, titre toujours clair
   (illisible noir sur noir dans la page Contact, section claire). */
.contact__card b { color: var(--cream); }
/* Survols sur fonds sombres : doré au lieu du bordeaux. */
.section--dark .btn--ghost:hover,
.page-header__actions .btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.page-header .breadcrumb a:hover,
footer .footer__links a:hover { color: var(--gold); }

/* Filtres (book, blog) sur fond clair : prévus pour un fond sombre
   (texte gris clair, 1,7:1 sur le papier) — version lisible. */
.section:not(.section--dark) .gallery-filter { color: var(--stone); border-color: var(--line); }
.section:not(.section--dark) .gallery-filter:hover { color: var(--bordeaux); border-color: var(--bordeaux); background: none; }
.section:not(.section--dark) .gallery-filter.is-active { color: var(--cream); border-color: var(--bordeaux); background: var(--bordeaux); }

/* ---------- Bloc Texte simple ---------- */
.df-prose { max-width: 68ch; }
.df-prose p { margin: 0 0 1em; }
.df-prose a { color: var(--bordeaux); }
.df-prose h2 {
  max-width: none; margin: 2.4rem 0 .8rem;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}
.df-prose h2:first-child { margin-top: 0; }
.df-prose ul { margin: 0 0 1em; padding-left: 1.2em; }

/* Liens légaux du pied de page */
.footer__legal a { color: inherit; text-decoration: none; }
.footer__legal a:hover { color: var(--gold); }

/* ---------- Vignettes de galerie avec photo ---------- */
/* La photo remplit la vignette (recadrage centré) ; un dégradé discret en
   bas garde la légende lisible. Survol / focus : léger zoom. */
a.moodboard__tile { display: block; color: inherit; text-decoration: none; }
.moodboard__tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; /* recadrage centré (quelques pixels : la case suit le ratio de la photo) */
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.moodboard__tile.has-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 18, 16, .62), rgba(20, 18, 16, 0) 45%);
}
.moodboard__tile span { z-index: 2; }
.moodboard__tile.has-photo span { color: var(--cream); }
a.moodboard__tile[data-lightbox] { cursor: zoom-in; }
a.moodboard__tile:hover img, a.moodboard__tile:focus-visible img { transform: scale(1.045); }
a.moodboard__tile:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }

/* ---------- Galeries : rangées justifiées (2026-10-11) ----------
   Chaque vignette a les proportions de sa photo (--r = largeur/hauteur,
   posé par includes/block_render.php) : portrait reste portrait, paysage
   reste paysage. Sans JS, flex-grow proportionnel au ratio donne des
   rangées à hauteur égale qui remplissent la largeur (seule la dernière
   s'étire). assets/gallery.js fixe ensuite la largeur exacte de chaque
   vignette pour des rangées équilibrées, sans trou, y compris après un
   filtre. Commun au moodboard de l'accueil et au book. */
.moodboard.is-justified, .gallery-grid.is-justified {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
}
/* Annule les tailles que style.css impose aux vignettes d'origine
   (:nth-child(1)/(4) du moodboard, 3:4 du book). */
.is-justified .moodboard__tile,
.is-justified .moodboard__tile:nth-child(n),
.is-justified .moodboard__tile[data-cat] {
  grid-column: auto; grid-row: auto;
  flex: var(--r, .75) 1 calc(var(--r, .75) * 15rem);
  aspect-ratio: var(--r, .75); height: auto; min-width: 0;
}
@media (max-width: 760px) {
  .is-justified .moodboard__tile,
  .is-justified .moodboard__tile:nth-child(n),
  .is-justified .moodboard__tile[data-cat] { flex-basis: calc(var(--r, .75) * 9rem); }
}

/* ---------- Galerie au format d'origine (logos) ----------
   Option « Recadrer les images » décochée : images entières, à hauteur
   égale, centrées ; aucun recadrage, transparence des PNG conservée. */
.gallery-logos {
  list-style: none; margin: 2.4rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: clamp(1.6rem, 4vw, 3.4rem) clamp(2rem, 5vw, 4.4rem);
}
.gallery-logos__item { display: flex; align-items: center; justify-content: center; }
.gallery-logos__item img {
  display: block; height: clamp(2.6rem, 5vw, 4rem); width: auto; max-width: 12rem;
  object-fit: contain;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.gallery-logos__item a:hover img, .gallery-logos__item a:focus-visible img { transform: scale(1.05); }

/* ---------- Visionneuse (assets/lightbox.js) ---------- */
html.lightbox-ouverte { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 12, 11, .97);
  opacity: 0; transition: opacity .25s var(--ease);
  touch-action: pan-y;
}
/* Fermée (attribut hidden), la visionneuse ne doit plus exister à l'écran :
   sans cette règle, display:flex l'emporte sur [hidden] et un calque
   invisible couvrait toute la page, bloquant les clics (réouverture de la
   galerie, menu mobile…). */
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__stage {
  margin: 0; max-width: min(92vw, 1400px); display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.lightbox__img {
  display: block; max-width: 100%; max-height: 82vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
  user-select: none; -webkit-user-drag: none;
}
.lightbox__caption {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--stone-invert); text-align: center;
}
.lightbox__count {
  position: absolute; top: 1.4rem; left: 1.6rem; margin: 0;
  font-size: .72rem; letter-spacing: .2em; color: var(--stone-invert);
}
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 1px solid var(--line-invert); color: var(--cream);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.lightbox__close { top: 1rem; right: 1rem; width: 2.8rem; height: 2.8rem; font-size: 1.6rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 3.2rem; height: 3.2rem; font-size: 2rem; line-height: 1; border-radius: 50%; }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }
.lightbox__close:hover, .lightbox__nav:hover,
.lightbox__close:focus-visible, .lightbox__nav:focus-visible { border-color: var(--bordeaux); background: var(--bordeaux); color: var(--cream); outline: none; }
@media (max-width: 760px) {
  .lightbox__img { max-height: 74vh; }
  .lightbox__nav { top: auto; bottom: 1.4rem; transform: none; width: 2.8rem; height: 2.8rem; }
  .lightbox__nav--prev { left: calc(50% - 3.6rem); }
  .lightbox__nav--next { right: calc(50% - 3.6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox__img, .moodboard__tile img { transition: none; }
}

/* ---------- Tableau comparatif ---------- */
.df-table { overflow-x: auto; }
.df-table table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .95rem; }
.df-table th, .df-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: center; }
.df-table tbody th { text-align: left; font-weight: 500; }
.df-table thead th { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.df-table .is-highlighted { background: var(--bordeaux-soft); }
.section--dark .df-table th, .section--dark .df-table td { border-bottom-color: var(--line-invert); }
.section--dark .df-table .is-highlighted { background: rgba(243, 239, 230, .06); }

/* ---------- Blog ---------- */
.df-blog-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.4rem; }
.df-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.df-blog-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .3s var(--ease); }
.df-blog-card:hover { border-color: var(--bordeaux); }
.df-blog-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.df-blog-card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.df-blog-card__cat { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bordeaux); font-weight: 600; margin-bottom: .6rem; }
.df-blog-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.2; margin: 0 0 .7rem; }
.df-blog-card p { color: var(--stone); font-size: .95rem; margin: 0 0 1.2rem; }
.df-blog-card__more { margin-top: auto; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--bordeaux); }
.df-post { max-width: 72ch; }
.df-post__cover { width: 100%; height: auto; display: block; margin: 0 0 2.4rem; }
.df-post__content h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin: 2.2rem 0 .8rem; }
.df-post__content p { margin: 0 0 1.1em; }
.df-post__content a { color: var(--bordeaux); }
.df-post__content img { max-width: 100%; height: auto; }

/* ---------- Pop-up ---------- */
.site-popup {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 18, 16, .6); padding: var(--pad); transition: opacity .2s;
}
.site-popup.closing { opacity: 0; }
.site-popup-card {
  position: relative; background: var(--paper); color: var(--ink);
  padding: 2rem 1.8rem; width: min(460px, 100%); max-height: 90vh; overflow: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); border-top: 3px solid var(--bordeaux);
}
.site-popup-card img { display: block; width: 100%; height: auto; margin-bottom: 1.2rem; }
.site-popup-card p { margin: 0; line-height: 1.6; }
.site-popup-close {
  position: absolute; top: .5rem; right: .8rem; background: none; border: 0;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--stone);
}
.site-popup-close:hover { color: var(--bordeaux); }

/* ---------- Hero d'accueil « Éditorial clair » (2026-10-10) ----------
   Le hero d'origine était dessiné pour un fond sombre (texte crème) : une
   fois la photo de studio clair posée dessus, titre et sous-titre devenaient
   illisibles (contraste ~1,7:1), surtout en mobile où le texte recouvrait le
   visage. Ici : photo en <img> (includes/block_render.php), texte sombre sur
   la partie claire du studio, voile crème à gauche pour garantir la
   lecture, bandeau défilant en pleine largeur. En mobile, la photo passe
   au-dessus du texte (aucun chevauchement). Ne s'applique qu'au hero avec
   photo (.hero--photo) : sans photo, le hero sombre d'origine reste intact. */
.hero.hero--photo {
  background: var(--paper);               /* remplace le fond sombre et l'image CSS de .index */
  color: var(--ink);
  flex-direction: column; align-items: stretch; justify-content: flex-end;
  /* Un peu moins haut que l'écran : le bandeau est visible dès l'arrivée,
     avec le début de la section suivante en dessous. */
  min-height: 92svh;
  padding-top: clamp(5.5rem, 11svh, 8rem);
}
.hero.hero--photo::before { display: none; }
.hero.hero--photo .hero__photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 70% 8%;
}
.hero.hero--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 245, 225, .96) 0%, rgba(255, 247, 232, .86) 32%, rgba(255, 255, 255, 0) 58%);
}
.hero.hero--photo .hero__grain { opacity: .12; z-index: 1; }
/* Bloc texte centré verticalement entre l'en-tête et le bandeau ; titre et
   espacements suivent aussi la hauteur d'écran, pour que tout tienne sur
   un portable (écran bas) sans repousser le bandeau sous la ligne de flottaison. */
.hero.hero--photo .hero__inner { z-index: 2; margin-block: auto; padding-bottom: clamp(1.5rem, 4svh, 3.4rem); }
.hero.hero--photo h1 { font-size: clamp(2.6rem, min(7vw, 10.5svh), 6rem); }
.hero.hero--photo .hero__kicker { margin-bottom: min(1.6rem, 2.4svh); }
.hero.hero--photo .hero__sub { margin-top: min(1.8rem, 2.6svh); }
.hero.hero--photo .hero__actions { margin-top: min(2.6rem, 3.6svh); }
.hero.hero--photo h1,
.hero.hero--photo h1 em,
.hero.hero--photo .hero__sub,
.hero.hero--photo .hero__kicker { text-shadow: none; }
.hero.hero--photo h1 { color: var(--ink); }
.hero.hero--photo h1 em { color: var(--bordeaux); }
.hero.hero--photo .hero__sub { color: #4f4840; }
.hero.hero--photo .hero__actions .btn--ghost { border-color: var(--ink); color: var(--ink); }
.hero.hero--photo .hero__actions .btn--ghost:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.hero.hero--photo .ticker { z-index: 2; width: 100%; margin-top: 0; background: var(--ink); border-top: 0; }
.hero.hero--photo .ticker__track span { color: var(--cream); }
/* La piste contient TICKER_COPIES copies par moitié (includes/block_render.php,
   tickerTrack()) : durées d'extra.css (30 s / 22 s) multipliées d'autant
   pour garder la même vitesse de défilement. */
.ticker__track { animation-duration: 120s; }

@media (max-width: 768px) {
  .ticker__track { animation-duration: 88s; }
  .hero.hero--photo { min-height: 0; padding-top: 4.4rem; }  /* sous l'en-tête fixe */
  .hero.hero--photo::after { display: none; }
  .hero.hero--photo .hero__photo {
    position: relative; inset: auto; order: -1;
    height: 52svh; object-position: 80% 18%;
  }
  /* Bandeau juste sous la photo : visible dès l'arrivée sur la page. */
  .hero.hero--photo .ticker { order: -1; margin-top: 0; }
  .hero.hero--photo .hero__inner { padding-top: 2rem; padding-bottom: 2.4rem; }
  .hero.hero--photo h1 { font-size: clamp(2.2rem, 12.5vw, 4rem); }
  .hero.hero--photo .hero__kicker { margin-bottom: 1.6rem; }
  .hero.hero--photo .hero__sub { margin-top: 1.8rem; }
  .hero.hero--photo .hero__actions { margin-top: 2.6rem; }
}

/* ---------- Hero d'accueil : animations d'apparition (2026-10-10) ----------
   Séquence jouée au chargement, en CSS pur (aucune dépendance au JS : le
   texte ne peut pas rester invisible). La photo se dévoile avec un léger
   dézoom puis dérive très lentement en continu ; le trait du kicker se
   dessine, puis kicker, titre, « em », sous-titre et boutons montent en
   cascade ; le bandeau, lui, est là d'emblée. `prefers-reduced-motion` est
   respecté par la règle globale de style.css (durées ramenées à ~0, état
   final affiché d'emblée grâce à fill-mode both). */
@keyframes heroPhotoIn   { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes heroPhotoDrift { from { transform: scale(1); } to { transform: scale(1.045) translateX(-1%); } }
@keyframes heroFade      { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroRise      { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes heroLine      { from { width: 0; } to { width: 30px; } }

.hero.hero--photo .hero__photo {
  transform-origin: 70% 30%;
  animation: heroPhotoIn 1.8s var(--ease) both,
             heroPhotoDrift 22s ease-in-out 1.8s infinite alternate;
}
.hero.hero--photo::after { animation: heroFade 1.2s ease .2s both; }
.hero.hero--photo .hero__kicker { animation: heroRise .9s var(--ease) .45s both; }
.hero.hero--photo .hero__kicker::before { animation: heroLine .8s var(--ease) .7s both; }
.hero.hero--photo h1 { animation: heroRise 1.1s var(--ease) .6s both; }
.hero.hero--photo h1 em { display: inline-block; animation: heroRise 1.1s var(--ease) .85s both; }
.hero.hero--photo .hero__sub { animation: heroRise 1s var(--ease) 1.05s both; }
.hero.hero--photo .hero__actions > * { animation: heroRise .9s var(--ease) 1.25s both; }
.hero.hero--photo .hero__actions > * + * { animation-delay: 1.38s; }

@media (max-width: 768px) {
  /* En mobile, la photo n'est pas en fond : pas de dérive (elle déborderait). */
  .hero.hero--photo .hero__photo { animation: heroPhotoIn 1.6s var(--ease) both; }
}
