/* V67 — Responsive Integrity / Révision Totale
   Priorité : aucun numéro sur une image, aucun crop destructeur, documents lisibles,
   iPhone propre, rapport 2022 correctement composé. */

body.cinematic-v67{
  --v67-line:rgba(151,194,207,.14);
  --v67-line-strong:rgba(157,205,218,.24);
  --v67-ink:#eef2f3;
  --v67-muted:#9aadb3;
  --v67-blue:#6f99a6;
  --v67-panel:#061015;
  overflow-x:clip;
}
body.cinematic-v67 img{max-width:100%;}
body.cinematic-v67 main>section,
body.cinematic-v67 #engagements,
body.cinematic-v67 #archives,
body.cinematic-v67 #musique,
body.cinematic-v67 #ecrits{scroll-margin-top:calc(82px + env(safe-area-inset-top));}

/* Accessibilité : le lien d’évitement n’est visible que lorsqu’un utilisateur clavier le demande. */
body.cinematic-v67 .skip-link{
  transform:translateY(-180%)!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.cinematic-v67 .skip-link:focus-visible{
  transform:none!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/* Topbar : géométrie plus stable et sûre sous iOS. */
body.cinematic-v67 .topbar{
  box-sizing:border-box!important;
  padding-top:max(8px,env(safe-area-inset-top))!important;
}
body.cinematic-v67 .topbar>*{min-width:0;}

/* ===== ENGAGEMENTS / RECONNAISSANCES ===== */
body.cinematic-v67 .achievement-card{
  overflow:hidden!important;
  border-color:var(--v67-line)!important;
  contain:layout paint;
}
body.cinematic-v67 .achievement-copy{
  position:relative;
  align-self:stretch;
  justify-content:center;
}

/* Le numéro appartient au texte, jamais au média. */
body.cinematic-v67 .achievement-number{
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  width:max-content!important;
  min-width:0!important;
  height:auto!important;
  margin:0 0 22px!important;
  padding:0 0 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  border:0!important;
  border-bottom:1px solid var(--v67-line-strong)!important;
  background:transparent!important;
  color:#7197a2!important;
  font:500 19px/1 var(--v66-serif,Georgia,serif)!important;
  letter-spacing:.02em!important;
  font-variant-numeric:tabular-nums;
  box-shadow:none!important;
}
body.cinematic-v67 .achievement-number::after{
  content:"";
  width:28px;
  height:1px;
  margin-left:12px;
  background:linear-gradient(90deg,rgba(133,184,198,.65),transparent);
}

/* Les images gardent désormais leur ratio natif. Aucune photo n’est forcée en carré/4:3. */
body.cinematic-v67 .achievement-media,
body.cinematic-v67 .achievement-card .achievement-media,
body.cinematic-v67 .achievement-card--wide .achievement-media,
body.cinematic-v67 .achievement-card--document .achievement-media{
  min-height:0!important;
  height:auto!important;
  aspect-ratio:auto!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#071015,#03080b)!important;
}
body.cinematic-v67 .achievement-media a{
  width:100%!important;
  height:auto!important;
  display:block!important;
  line-height:0;
}
body.cinematic-v67 .achievement-media img,
body.cinematic-v67 .achievement-card:not(.achievement-card--document):not(.achievement-card--report) .achievement-media img,
body.cinematic-v67 .achievement-card--document .achievement-media img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  padding:0!important;
}
body.cinematic-v67 .achievement-card--document .achievement-media{
  padding:clamp(10px,1.5vw,18px)!important;
}
body.cinematic-v67 .achievement-card--document .achievement-media img{
  background:#eef0ed!important;
  filter:saturate(.78) contrast(1.025) brightness(.97)!important;
}
body.cinematic-v67 .achievement-media--landscape img{max-width:100%!important;}
body.cinematic-v67 .achievement-media--portrait img{max-width:min(100%,760px)!important;margin-inline:auto;}

/* Les cartes larges ne doivent pas écraser une image lorsque le texte est plus haut. */
@media(min-width:981px){
  body.cinematic-v67 .achievement-card--wide{
    grid-template-columns:minmax(0,1.08fr) minmax(330px,.92fr)!important;
    align-items:center!important;
  }
  body.cinematic-v67 .achievement-card--wide .achievement-media{align-self:center!important;}
  body.cinematic-v67 .achievement-card--wide.achievement-card--document .achievement-media{align-self:stretch!important;}
  body.cinematic-v67 .achievement-card--wide .achievement-copy{padding:clamp(34px,4vw,58px)!important;}
}

/* Rapport 2022 : un dossier documentaire, pas une mosaïque recadrée. */
body.cinematic-v67 .achievement-card--report{
  grid-template-columns:minmax(0,1.28fr) minmax(330px,.72fr)!important;
  align-items:center!important;
}
body.cinematic-v67 .achievement-report-gallery{
  min-height:0!important;
  aspect-ratio:auto!important;
  display:grid!important;
  grid-template-columns:minmax(210px,.62fr) minmax(0,1.38fr)!important;
  grid-template-rows:auto auto!important;
  gap:12px!important;
  padding:14px!important;
  background:#061015!important;
}
body.cinematic-v67 .achievement-report-gallery a{
  position:relative!important;
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:28px 10px 10px!important;
  background:#f3f2ed!important;
  border:1px solid rgba(4,12,16,.12)!important;
}
body.cinematic-v67 .achievement-report-gallery a:first-child{
  grid-row:1 / 3!important;
  grid-column:1!important;
}
body.cinematic-v67 .achievement-report-gallery a:nth-child(2){grid-column:2!important;grid-row:1!important;}
body.cinematic-v67 .achievement-report-gallery a:nth-child(3){grid-column:2!important;grid-row:2!important;}
body.cinematic-v67 .achievement-report-gallery a::before{
  content:attr(data-report-label);
  position:absolute;
  top:9px;left:10px;
  color:#66757b;
  font:700 7px/1.1 var(--v66-sans,Arial,sans-serif);
  letter-spacing:.16em;
  text-transform:uppercase;
}
body.cinematic-v67 .achievement-report-gallery img,
body.cinematic-v67 .achievement-report-gallery a:first-child img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  filter:saturate(.76) contrast(1.015) brightness(.99)!important;
}

/* Galeries de décorations : chaque pièce doit être visible en entier. */
body.cinematic-v67 .achievement-gallery-4,
body.cinematic-v67 .achievement-gallery-v65,
body.cinematic-v67 .achievement-gallery-v65--2,
body.cinematic-v67 .achievement-gallery-v65--3{
  min-height:0!important;
  height:auto!important;
  aspect-ratio:auto!important;
  gap:10px!important;
  padding:10px!important;
  background:#061015!important;
  align-items:start!important;
}
body.cinematic-v67 .achievement-gallery-4{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;}
body.cinematic-v67 .achievement-gallery-v65--2{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
body.cinematic-v67 .achievement-gallery-v65--3{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
body.cinematic-v67 .achievement-gallery-4 a,
body.cinematic-v67 .achievement-gallery-v65 a{
  min-height:0!important;
  height:auto!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  padding:8px!important;
  background:linear-gradient(180deg,#0a151a,#050a0d)!important;
}
body.cinematic-v67 .achievement-gallery-4 img,
body.cinematic-v67 .achievement-gallery-v65 img{
  width:100%!important;
  height:auto!important;
  max-height:680px!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:0!important;
  transform:none!important;
}

/* Le texte gagne une cadence plus éditoriale sans devenir énorme sur téléphone. */
body.cinematic-v67 .achievement-copy h3{
  max-width:22ch!important;
  text-wrap:balance;
}
body.cinematic-v67 .achievement-copy p{
  max-width:64ch!important;
  text-wrap:pretty;
}

/* Livres, musique, archives : garde-fous de dimensions globaux. */
body.cinematic-v67 .music-artwork img,
body.cinematic-v67 .writing-cover img,
body.cinematic-v67 .chapter-visual img{
  max-width:100%!important;
}
body.cinematic-v67 .writing-cover img{height:auto!important;object-fit:contain!important;}
body.cinematic-v67 .archive-link{min-width:0;}
body.cinematic-v67 .archive-title{overflow-wrap:anywhere;}

/* Responsive — iPhone / petits écrans. */
@media(max-width:720px){
  body.cinematic-v67 .skip-link{display:none!important;}
  body.cinematic-v67 .chapter-spine,
  body.cinematic-v67 .chapter-guide,
  body.cinematic-v67 .cinema-hud,
  body.cinematic-v67 .v30-controls,
  body.cinematic-v67 .v30-director,
  body.cinematic-v67 .v36-master-hud,
  body.cinematic-v67 .v42-film-rail,
  body.cinematic-v67 .v43-safe-frame{display:none!important;}

  body.cinematic-v67 .topbar{
    min-height:calc(58px + env(safe-area-inset-top))!important;
    height:auto!important;
    padding:calc(7px + env(safe-area-inset-top)) 10px 7px!important;
    grid-template-columns:auto 1fr auto!important;
    gap:7px!important;
  }
  body.cinematic-v67 .topbar .brand{width:52px!important;min-width:52px!important;}
  body.cinematic-v67 .topbar .edition,
  body.cinematic-v67 .v64-context{display:none!important;}
  body.cinematic-v67 .lang-switch{justify-self:center!important;}
  body.cinematic-v67 .menu-button{justify-self:end!important;min-width:42px!important;}
  body.cinematic-v67 .menu-button span{display:none!important;}
  body.cinematic-v67 .menu-button i{font-size:18px!important;}

  body.cinematic-v67 .achievements-shell{width:calc(100% - 24px)!important;}
  body.cinematic-v67 .achievement-card{
    margin-bottom:16px!important;
    display:block!important;
    grid-template-columns:1fr!important;
  }
  body.cinematic-v67 .achievement-card .achievement-media,
  body.cinematic-v67 .achievement-card--wide:not(.achievement-card--document) .achievement-media,
  body.cinematic-v67 .achievement-card--document .achievement-media{
    aspect-ratio:auto!important;
    height:auto!important;
  }
  body.cinematic-v67 .achievement-card--document .achievement-media{padding:9px!important;}
  body.cinematic-v67 .achievement-copy{padding:24px 22px 28px!important;}
  body.cinematic-v67 .achievement-number{margin-bottom:17px!important;font-size:17px!important;}
  body.cinematic-v67 .achievement-copy h3{font-size:clamp(27px,8.3vw,38px)!important;line-height:1.02!important;max-width:100%!important;}
  body.cinematic-v67 .achievement-copy p{font-size:16px!important;line-height:1.72!important;}

  body.cinematic-v67 .achievement-card--report{display:block!important;}
  body.cinematic-v67 .achievement-report-gallery{
    grid-template-columns:1fr!important;
    grid-template-rows:auto!important;
    padding:10px!important;
    gap:10px!important;
  }
  body.cinematic-v67 .achievement-report-gallery a,
  body.cinematic-v67 .achievement-report-gallery a:first-child,
  body.cinematic-v67 .achievement-report-gallery a:nth-child(2),
  body.cinematic-v67 .achievement-report-gallery a:nth-child(3){
    grid-column:1!important;
    grid-row:auto!important;
    width:100%!important;
  }
  body.cinematic-v67 .achievement-report-gallery a:first-child{
    width:min(78%,300px)!important;
    justify-self:center!important;
  }

  body.cinematic-v67 .achievement-gallery-4,
  body.cinematic-v67 .achievement-gallery-v65,
  body.cinematic-v67 .achievement-gallery-v65--2,
  body.cinematic-v67 .achievement-gallery-v65--3{
    grid-template-columns:1fr!important;
  }
  body.cinematic-v67 .achievement-gallery-4 a,
  body.cinematic-v67 .achievement-gallery-v65 a{min-height:0!important;}
  body.cinematic-v67 .achievement-gallery-4 img,
  body.cinematic-v67 .achievement-gallery-v65 img{max-height:none!important;}

  body.cinematic-v67 .achievement-divider,
  body.cinematic-v67 .v66-ach-group-head{padding-left:2px!important;padding-right:2px!important;}
  body.cinematic-v67 .v66-ach-nav{margin-bottom:36px!important;}

  body.cinematic-v67 .archive-head h2{font-size:clamp(54px,17vw,72px)!important;overflow-wrap:anywhere;}
  body.cinematic-v67 .archive-master-interviews .archive-link{align-items:start!important;}
}

@media(max-width:390px){
  body.cinematic-v67 .lang-switch button{min-width:29px!important;width:29px!important;height:28px!important;padding:0!important;}
  body.cinematic-v67 .achievement-copy{padding:22px 18px 25px!important;}
  body.cinematic-v67 .achievement-copy p{font-size:15.5px!important;}
}

@media(prefers-reduced-motion:reduce){
  body.cinematic-v67 .achievement-media img,
  body.cinematic-v67 .achievement-gallery-4 img,
  body.cinematic-v67 .achievement-gallery-v65 img,
  body.cinematic-v67 .achievement-report-gallery img{transition:none!important;transform:none!important;}
}
