/* =====================================================================
   Rebecca Bedelia — pages « Illustrations » (une page par année, 2020 → 2026)
   D'après les maquettes XD « Page - Illustrations » du 11/11/2026.
   S'ajoute à style.css (en-tête, pied de page, couleurs, typo, bande signature).
   ===================================================================== */

/* ---------- En-tête de page ---------- */
.i-hero { position: relative; height: 450px; border-bottom: 2px solid var(--fonce);
  /* fond vagues à 75 % d'opacité, comme l'accueil et la page Projets */
  background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.25)), url(../img/vagues.webp) center 38% / max(1606px, 112vw) auto no-repeat, var(--violet); }
.i-hero-in { position: absolute; left: 0; right: 0; top: 168px; width: min(1240px, calc(100% - 40px)); margin-inline: auto;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.i-titre { font-size: 132px; line-height: 1; font-weight: 800; letter-spacing: -4.4px; font-variation-settings: 'opsz' 12; color: var(--fonce); text-shadow: 6px 6px 0 var(--blanc); margin-left: -6px; }
.i-chapo { display: inline-block; margin-top: 20px; font-variation-settings: 'opsz' 12; padding: 12px 18px 13px; background: var(--blanc); border: 3px solid var(--fonce); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--fonce); color: var(--fonce); font-size: 18.6px; line-height: 1.3; transform: rotate(-2deg); transform-origin: left center; }

/* Choix de l'année : bouton orange + menu déroulant (2026 → 2020) */
.i-annee { position: relative; margin-bottom: -6px; }
.i-annee-btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 28px; border: 3px solid var(--fonce); border-radius: 999px;
  background: var(--orange); color: var(--blanc); box-shadow: 3px 3px 0 var(--fonce); font-weight: 700; font-size: 21px; font-variation-settings: 'opsz' 12; cursor: pointer; transition: transform .15s; }
.i-annee-btn svg { width: 11px; height: 7px; fill: currentColor; transition: transform .2s; }
.i-annee-btn:hover { transform: rotate(-3deg); }
.i-annee:hover .i-annee-btn svg, .i-annee:focus-within .i-annee-btn svg, .i-annee.est-ouvert .i-annee-btn svg { transform: rotate(180deg); }
/* le menu des années reprend exactement le menu déroulant « Illustration » de l'en-tête (.sous-menu de style.css) */
.i-annee:hover .sous-menu, .i-annee:focus-within .sous-menu, .i-annee.est-ouvert .sous-menu { opacity: 1; visibility: visible; transform: translateY(0) rotate(-1deg); }

/* ---------- Galerie : chaque illustration à sa place sur la maquette ----------
   Le cadre fait 1440 px de large (comme la maquette) et se réduit en proportion sur les écrans plus étroits :
   positions et tailles sont en unités de maquette (--m = 1 px de maquette). */
.i-galerie { container-type: inline-size; width: min(1440px, 100%); margin-inline: auto; }
.i-plan { --m: calc(100cqw / 1440); position: relative; height: calc(var(--h) * var(--m)); }
.ill { position: absolute; left: calc(var(--x) * var(--m)); top: calc(var(--y) * var(--m)); width: calc(var(--w) * var(--m)); margin: 0; }
.ill-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .25s; }
.ill-btn img { width: 100%; height: auto; }
/* survol : l'illustration se soulève et penche, ombre violette (ou citron une fois sur deux) qui suit les coins arrondis */
.ill:nth-child(odd) .ill-btn:hover, .ill:nth-child(odd) .ill-btn:focus-visible { transform: translateY(-6px) rotate(-1.5deg); filter: drop-shadow(8px 8px 0 var(--violet)); }
.ill:nth-child(even) .ill-btn:hover, .ill:nth-child(even) .ill-btn:focus-visible { transform: translateY(-6px) rotate(1.5deg); filter: drop-shadow(8px 8px 0 var(--lime)); }
/* légende accrochée sous son illustration, placée comme sur la maquette */
.ill figcaption { position: absolute; left: 50%; top: calc(100% + var(--cy) * var(--m)); width: max-content; max-width: calc(var(--w) * var(--m) + 120 * var(--m));
  transform: translateX(calc(-50% + var(--cx) * var(--m))); text-align: center;
  font-size: max(11px, calc(13 * var(--m))); line-height: 1.17; font-weight: 700; color: #000; }

/* ---------- Bande qui défile ---------- */
.i-bande { overflow: hidden; background: var(--fonce); color: var(--blanc); }
.i-bande-piste { display: flex; width: max-content; animation: defile 34s linear infinite; }
.i-bande-piste > span { display: flex; align-items: center; gap: 32px; padding-right: 32px; height: 90px; font-weight: 700; font-size: 40px; letter-spacing: -.4px; white-space: nowrap; font-variation-settings: 'opsz' 12; }
.i-bande-piste i { font-style: normal; color: var(--lime); font-size: 34px; font-weight: 400; }
.i-bande:hover .i-bande-piste { animation-play-state: paused; }

/* ---------- Année suivante / précédente ---------- */
.i-suite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 3px solid var(--fonce); }
.i-suite a { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 170px; padding: 0 40px; text-decoration: none; color: var(--fonce);
  background: var(--blanc); transition: background-color .2s; }
.i-suite a:first-child { background: var(--lavande); border-right: 3px solid var(--fonce); }
.i-suite a:last-child { align-items: flex-end; text-align: right; }
.i-suite a:hover, .i-suite a:focus-visible { background: var(--lime); }
.i-suite-cle { font-weight: 700; font-size: 14px; letter-spacing: 1px; font-variation-settings: 'opsz' 12; text-transform: uppercase; }
.i-suite-cle span { display: inline-block; margin: 0 4px; transition: transform .25s; }
.i-suite a:hover .i-suite-cle span { transform: translateX(-6px); }
.i-suite a:last-child:hover .i-suite-cle span { transform: translateX(6px); }
.i-suite-grand { font-weight: 800; font-size: 56px; line-height: 1; font-variation-settings: 'opsz' 12; }

/* ---------- Visionneuse ---------- */
.visionneuse { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(61,43,110,.92); }
.visionneuse[hidden] { display: none; }
/* clic dans le vide (autour de l'image et des boutons) = fermer : le fond capte le clic */
.visionneuse-fond { position: absolute; inset: 0; cursor: zoom-out; }
.visionneuse-in, .visionneuse-barre { position: relative; pointer-events: none; }
.visionneuse-img, .lbbtn { pointer-events: auto; }
.visionneuse-in { width: 100%; max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: zoomIn .35s cubic-bezier(.34,1.56,.64,1) both; }
.visionneuse-img { max-height: 70vh; width: auto; max-width: 100%; }
.visionneuse-barre { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 760px; }
.visionneuse-txt { color: var(--blanc); font-weight: 800; font-size: 18px; text-align: center; }
.lbbtn { min-width: 52px; min-height: 52px; border-radius: 999px; border: 3px solid var(--fonce); background: var(--lime); color: var(--fonce);
  font-weight: 800; font-size: 18px; cursor: pointer; }
.lbbtn:hover { background: var(--blanc); }
.lbbtn-fermer { padding: 0 22px; background: var(--blanc); }
.lbbtn-fermer:hover { background: var(--lime); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.92) rotate(-2deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { .i-bande-piste, .visionneuse-in { animation: none !important; } .ill-btn { transition: none; } }

/* ---------- Tablette (jusqu'à 1100 px) : la galerie garde sa mise en page en se réduisant ---------- */
@media (max-width: 1100px) {
  .i-hero { height: auto; padding: 150px 0 50px; }
  .i-hero-in { position: static; flex-wrap: wrap; }
  .i-titre { font-size: 104px; letter-spacing: -3.5px; text-shadow: 5px 5px 0 var(--blanc); }
}
@media (max-width: 900px) {
  .burger { order: -1; width: 46px; height: 46px; }
  .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .entete-in { justify-content: flex-start; min-height: 47px; }
}
/* ---------- Téléphone (jusqu'à 600 px) : illustrations les unes sous les autres (passe mobile à venir) ---------- */
@media (max-width: 600px) {
  .i-hero { padding: 130px 0 44px; }
  .i-titre { font-size: 64px; letter-spacing: -2px; text-shadow: 4px 4px 0 var(--blanc); }
  .i-chapo { font-size: 16px; }
  .i-galerie { width: calc(100% - 40px); padding: 40px 0 60px; }
  .i-plan { height: auto; display: flex; flex-direction: column; gap: 40px; }
  .ill { position: static; width: 100%; }
  .ill figcaption { position: static; transform: none; width: auto; max-width: none; margin-top: 12px; font-size: 13px; }
  .ill figcaption br { display: none; }
  .i-bande-piste > span { height: 64px; font-size: 26px; }
  .i-suite { grid-template-columns: minmax(0, 1fr); }
  .i-suite a:first-child { border-right: 0; border-bottom: 3px solid var(--fonce); }
  .i-suite a { min-height: 130px; padding: 0 20px; }
  .i-suite-grand { font-size: 44px; }
}

/* Téléphone : le texte d'intro se remet en ligne naturellement (sans les retours à la ligne du desktop) */
@media (max-width: 600px) { .i-chapo br { display: none; } }
@media (max-width: 600px) { .i-titre { font-size: min(64px, 16vw); margin-left: 0; } .i-chapo { max-width: calc(100% - 6px); } }
