/*
  YACHTMER — responsive.css
  Requêtes média, du grand écran au téléphone. Chargée en dernier : elle réduit les grilles et le rythme
  typographique, sans jamais retirer de contenu.
*/

/* ---------- Grand ordinateur portable (≤ 1180 px) ---------- */
@media (max-width: 1180px) {
  .metier {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 5fr);
  }
  .metier__chiffre {
    grid-column: 3;
    justify-self: start;
  }
  .modele__donnees {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Tablette (≤ 1024 px) : la ligne d'horizon cède la place à la carte marine ---------- */
@media (max-width: 1024px) {
  :root {
    --header-h: 72px;
    --horizon-h: 0px;
  }
  .horizon {
    display: none;
  }
  .barre {
    display: grid;
  }
  .bandeau__position {
    visibility: hidden;
  }

  .hero {
    padding-bottom: clamp(32px, 6vh, 56px);
  }
  .fiche {
    position: static;
    grid-row: 2;
    width: auto;
    margin-top: var(--stack);
  }
  .fiche__donnees {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chantier__tete,
  .carenage__tete {
    grid-template-columns: minmax(0, 1fr);
  }
  .chantier__scene,
  .carenage__scene {
    min-height: 0;
  }
  .chantier__dessin,
  .carenage__vue {
    min-height: 0;
    aspect-ratio: 1600 / 600;
  }
  .carenage__vue {
    aspect-ratio: 1600 / 640;
  }

  .flotte__scene {
    min-height: 0;
  }
  .flotte__rail {
    flex-direction: column;
    overflow: visible;
  }
  .modele,
  .modele--appel {
    width: auto;
  }

  .config,
  .visite__grille {
    grid-template-columns: minmax(0, 1fr);
  }
  .chiffres__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
  .pied__grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Téléphone (≤ 600 px) ---------- */
@media (max-width: 600px) {
  :root {
    --section-y: clamp(72px, 10vh, 104px);
    --fs-hero: clamp(2.9rem, 13.5vw, 4.4rem);
  }
  .bandeau {
    grid-template-columns: 1fr auto;
  }
  .bandeau__position {
    display: none;
  }
  .marque {
    justify-self: start;
  }
  .marque__nom {
    font-size: 1.2rem;
    letter-spacing: 0.26em;
  }
  .bandeau__visite {
    display: none;
  }
  .bandeau__actions {
    gap: 10px;
  }

  .hero__actions .btn {
    width: 100%;
  }
  .fiche__donnees {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mer__soleil,
  .generique__soleil {
    left: 70%;
  }
  .mer__yacht {
    left: 58%;
  }

  .metier {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 16px 20px;
  }
  .metier__texte,
  .metier__chiffre {
    grid-column: 1 / -1;
  }

  .choix__teintes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .config__fiche {
    grid-template-columns: minmax(0, 1fr);
  }
  .chiffres__liste,
  .pied__grille {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Écrans très larges ---------- */
@media (min-width: 1800px) {
  :root {
    --conteneur: 1500px;
  }
}

/* ---------- Impression ---------- */
@media print {
  .bandeau,
  .horizon,
  .carte,
  .skip-link,
  .mer {
    display: none;
  }
}

/* ==========================================================================================
   Portage au standard du portfolio (25/09/2026) : galerie, carnet, questions, film, logo
   ========================================================================================== */
@media (max-width: 1024px) {
  .faq-section__grille {
    grid-template-columns: minmax(0, 1fr);
  }
  .galerie__grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .galerie__item--haut {
    grid-row: auto;
  }
  .galerie__item--large .visuel {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 860px) {
  .js .cine__texte {
    right: var(--gutter);
    bottom: 72px;
  }
  .js .cine__reperes {
    display: none;
  }
  .js .cine__invite {
    top: calc(var(--header-h) + 60px);
  }
  .cine__voile {
    background: linear-gradient(
      0deg,
      rgb(19 17 13 / 0.82) 0%,
      rgb(19 17 13 / 0.24) 48%,
      rgb(19 17 13 / 0) 68%
    );
  }
}

@media (max-width: 600px) {
  .galerie__grille {
    grid-template-columns: minmax(0, 1fr);
  }
  .carnet__etape {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 22px;
  }
  .carnet__mois {
    grid-row: auto;
  }
  .page__fiche {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .page__fiche dd {
    margin-bottom: 10px;
  }
  .marque {
    gap: 9px;
  }
  .marque__icone {
    width: 36px;
    height: 36px;
  }
  .marque__slogan {
    font-size: 0.86rem;
  }
}

/* ---------- Nouvelle section héros et film produit (T53, 02/11/2026) ---------- */
@media (max-width: 1080px) {
  .heros__cartes {
    display: none;
  }

  .heros__contenu {
    padding-bottom: clamp(90px, 14vh, 130px);
  }
}

/* Téléphone et petite tablette : le texte d'abord, puis l'appareil dans sa scène, puis les cartes */
@media (max-width: 760px) {
  .heros {
    padding: 8px;
  }

  .heros__cadre {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .heros__contenu {
    order: -1;
    max-width: none;
    padding: calc(var(--barre-hauteur) + 22px) 20px 8px;
  }

  .heros__scene {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    aspect-ratio: 16 / 11;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .heros__cartes {
    position: static;
    display: grid;
    gap: 8px;
    padding: 0 16px 18px;
  }

  .heros__carte {
    width: auto;
  }

  .heros__legende,
  .heros__meta,
  .heros__defiler {
    display: none;
  }

  .heros .bouton {
    flex: 1 1 100%;
  }

  /* Le film : jamais coupé, l'image entière au centre (on dézoome au lieu de recadrer) */
  .cine-produit__piste {
    height: 240vh;
  }

  .cine-produit__scene {
    padding: 8px;
  }

  .cine-produit__cadre {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: calc(var(--barre-hauteur) + 10px) 16px 20px;
  }

  .cine-produit__video {
    position: relative;
    inset: auto;
    z-index: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    transform: none;
  }

  .cine-produit__voile {
    display: none;
  }

  .cine-produit__tete {
    order: -1;
  }

  .cine-produit__tete,
  .cine-produit__etapes,
  .cine-produit__compteur {
    position: static;
    width: auto;
    max-width: none;
  }

  .cine-produit__etapes li {
    padding: 10px 12px;
  }
}

/* T54-FIN — nouvelle méthode cinématographique : piste du film au téléphone (arrêts compris) */
@media (max-width: 760px) {
  .cine-produit[data-cine-produit] .cine-produit__piste {
    height: 1210vh;
  }
}

/* T54-FIN — RÈGLE DES DEUX BOUTONS (exigence ferme) : deux boutons tiennent toujours sur une seule ligne ; la rangée
   devient un conteneur et rapetisse les boutons quand la place manque (au téléphone, l'icône de gauche s'efface) */
.heros__actions {
  flex-wrap: nowrap;
  gap: 10px;
  container-type: inline-size;
}

.heros__actions .bouton {
  flex: 0 0 auto;
  width: auto;
}

@container (max-width: 560px) {
  :is(.heros__actions) .bouton {
    gap: 8px;
    min-height: 46px;
    padding-left: 16px;
    font-size: 0.9rem;
  }

  :is(.heros__actions) .bouton--secondaire {
    padding-right: 16px;
  }

  :is(.heros__actions) .bouton__icone {
    width: 16px;
    height: 16px;
  }

  :is(.heros__actions) .bouton__fleche {
    margin-left: 2px;
    padding: 9px;
  }
}

@container (max-width: 440px) {
  :is(.heros__actions) .bouton {
    gap: 6px;
    padding-left: 12px;
    font-size: 13px;
  }

  :is(.heros__actions) .bouton--principal {
    padding-right: 4px;
  }

  :is(.heros__actions) .bouton--secondaire {
    padding-right: 12px;
  }

  :is(.heros__actions) .bouton__icone {
    width: 15px;
    height: 15px;
  }

  :is(.heros__actions) .bouton__fleche {
    width: 14px;
    height: 14px;
    padding: 8px;
  }
}

@container (max-width: 380px) {
  :is(.heros__actions) .bouton {
    gap: 6px;
    min-height: 42px;
    padding-left: 10px;
    font-size: 12px;
    letter-spacing: -0.02em;
  }

  :is(.heros__actions) .bouton__icone {
    display: none;
  }

  :is(.heros__actions) .bouton--principal {
    padding-right: 4px;
  }

  :is(.heros__actions) .bouton--secondaire {
    padding-right: 10px;
  }

  :is(.heros__actions) .bouton__fleche {
    width: 12px;
    height: 12px;
    margin-left: 1px;
    padding: 6px;
  }
}

@container (max-width: 330px) {
  :is(.heros__actions) .bouton {
    gap: 4px;
    padding-left: 9px;
    font-size: 11px;
  }

  :is(.heros__actions) .bouton--secondaire {
    padding-right: 9px;
  }
}

@container (max-width: 262px) {
  :is(.heros__actions) .bouton {
    font-size: 10px;
  }
}

/* T54 16.3 (04/11/2026) : « Chaque yacht commence par un trait » — le plan de forme à gauche, la photo du yacht fini
   dans le hangar à droite (ancienne image du héros) ; le titre et le pied gardent toute la largeur */
.chantier__scene {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  column-gap: clamp(20px, 3vw, 48px);
}

.chantier__tete,
.chantier__pied {
  grid-column: 1 / -1;
}

.chantier__photo {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 24px 50px -30px rgb(10 30 28 / 0.6);
}

.chantier__dessin {
  overflow: clip;
}

.chantier__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
}

@media (max-width: 760px) {
  .chantier__scene {
    grid-template-columns: minmax(0, 1fr);
  }

  .chantier__photo {
    aspect-ratio: 4 / 3;
  }
}

/* T54 16.1 (04/11/2026) : le héros devient une grande image immersive — le yacht en mer au couchant remplit toute la
   section ; les textes sont posés sur le paysage, sans fond derrière eux : blanc ombré, cartouche en filets blancs,
   et un dégradé très doux sur la mer à gauche pour la lisibilité */
.heros--cartouche .heros__cadre::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 18 24 / 0.55) 0%, rgb(8 18 24 / 0.32) 32%, rgb(8 18 24 / 0) 55%);
  pointer-events: none;
}

.heros-cartouche__photo {
  object-position: 60% 50%;
}

.heros--cartouche .heros__surtitre,
.heros--cartouche .heros__titre,
.heros--cartouche .heros__chapeau,
.heros--cartouche .cartouche {
  color: #ffffff;
  text-shadow: 0 1px 14px rgb(0 10 16 / 0.6);
}

.heros--cartouche .heros__titre em {
  color: #f4d9a6;
}

.heros--cartouche .cartouche,
.heros--cartouche .cartouche__tete {
  border-color: rgb(255 255 255 / 0.85);
}

.heros--cartouche .cartouche__case {
  border-color: rgb(255 255 255 / 0.35);
}

.heros--cartouche .cartouche__case span {
  color: rgb(255 255 255 / 0.82);
}

.heros--cartouche .bouton--verre {
  color: #ffffff;
}

@media (max-width: 760px) {
  .heros--cartouche .heros__cadre {
    padding-bottom: 30px;
  }

  .heros-cartouche__photo {
    top: 0;
    height: 100%;
    object-position: 62% 50%;
  }

  .heros--cartouche .heros__cadre::after {
    background: linear-gradient(180deg, rgb(8 18 24 / 0.6) 0%, rgb(8 18 24 / 0.38) 50%, rgb(8 18 24 / 0.5) 100%);
  }
}

/* T54 16.2 (lisibilité) : sur la nouvelle séquence à bord (boiseries sombres), le titre à l'encre garde un fond clair —
   un voile crème très doux dans le coin du titre, invisible sur le ciel du couchant */
@media (min-width: 761px) {
  .cine-produit--cartouche .cine-produit__voile {
    background: radial-gradient(58% 66% at 0% 0%, rgb(250 245 235 / 0.9) 0%, rgb(250 245 235 / 0.62) 48%, rgb(250 245 235 / 0) 100%);
    z-index: auto;
  }
}

/* T54 16.4 (04/11/2026) : slogan du logo plus visible et animé avec fluidité — marine profond sur fond clair, laiton
   lumineux sur fond sombre ; plus de lettres qui sautent : un reflet de lumière glisse en continu sur le slogan */
.marque__slogan {
  --slogan-base: #f3dcaa;
  --slogan-eclat: #ffffff;
  font-weight: 500;
  color: var(--slogan-base);
}

.bandeau[data-sur="clair"] .marque__slogan {
  --slogan-base: #12303a;
  --slogan-eclat: #b07a1c;
  color: var(--slogan-base);
}

html[data-motion="full"] .marque--anime .marque__slogan span {
  animation: ym-slogan-reflet 6s cubic-bezier(0.45, 0, 0.55, 1) calc(var(--i) * 0.06s) infinite both;
}

@keyframes ym-slogan-reflet {
  0%,
  100% {
    opacity: 1;
    color: var(--slogan-base);
  }
  10% {
    opacity: 1;
    color: var(--slogan-eclat);
  }
  22% {
    color: var(--slogan-base);
  }
}

/* T54 16.5 (04/11/2026) : sur ordinateur, le bloc des étapes ne masque plus le film — fine frise horizontale tout en
   bas (cinq étapes sur une ligne, sur un léger fondu crème), compteur discret en haut à droite */
@media (min-width: 761px) {
  .cine-produit--cartouche .cine-produit__voile {
    background:
      radial-gradient(58% 66% at 0% 0%, rgb(250 245 235 / 0.9) 0%, rgb(250 245 235 / 0.62) 48%, rgb(250 245 235 / 0) 100%),
      linear-gradient(0deg, rgb(244 239 230 / 0.92) 0%, rgb(244 239 230 / 0.7) 90px, rgb(244 239 230 / 0) 170px);
  }

  .cine-produit--cartouche .cine-produit__etapes {
    top: auto;
    right: var(--h-gouttiere);
    bottom: calc(var(--horizon-h) + 4px);
    left: var(--h-gouttiere);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: auto;
    border: 0;
    border-top: 1px solid rgb(19 17 13 / 0.3);
    background: none;
  }

  .cine-produit--cartouche .cine-produit__etapes li {
    padding: 8px 12px 2px 0;
    border: 0;
    background: none;
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .cine-produit--cartouche .cine-produit__etapes li.est-active {
    background: none;
    box-shadow: inset 0 2px 0 #13110d;
  }

  /* Une seule ligne : le numéro et l'intitulé ; la précision reste dans le code pour les lecteurs d'écran */
  .cine-produit--cartouche .cine-produit__etapes li > span:last-child {
    font-size: 0;
  }

  .cine-produit--cartouche .cine-produit__etapes li strong {
    font-size: 0.76rem;
  }

  .cine-produit--cartouche .cine-produit__compteur {
    top: calc(var(--h-barre) + 2vh);
    bottom: auto;
    width: min(13rem, 18vw);
    color: #13110d;
    text-shadow: 0 0 10px rgb(250 245 235 / 0.9);
  }
}

/* T54 16.6 (04/11/2026) : sur téléphone, les étapes du film passent en blanc cassé (fond sombre sous le film) */
@media (max-width: 760px) {
  .cine-produit--cartouche .cine-produit__etapes li,
  .cine-produit--cartouche .cine-produit__compteur {
    color: rgb(244 239 230 / 0.78);
  }

  .cine-produit--cartouche .cine-produit__etapes strong,
  .cine-produit--cartouche .cine-produit__etapes li.est-active {
    color: #f7f2e8;
  }

  .cine-produit--cartouche .cine-produit__num {
    color: #e9cf98;
  }

  /* Titre lisible sur le haut clair, et marges latérales du titre et du compteur */
  .cine-produit--cartouche .cine-produit__titre em {
    color: #3a473e;
  }

  .cine-produit--cartouche .cine-produit__tete,
  .cine-produit--cartouche .cine-produit__compteur {
    padding-inline: 18px;
  }
}
