/* ════════════════════════════════════════════════════════════════
   Haut d'article « cinéma » (refonte du 22/09/2026, piste B)
   Balisage : themes/itsrugby/template-parts/hero-article.php
   La photo occupe le haut de l'écran, le titre est posé en bas de l'image
   sur un dégradé ; chapeau, auteur et dates passent sous l'image.
   Feuille hors RUCSS (its-rugby-templates.php) et versionnée par filemtime :
   un changement ici atteint aussi les articles au used-css déjà calculé.
   ════════════════════════════════════════════════════════════════ */

.art-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(560px, 72svh);
  background: var(--teal, #1C3D34); /* vert du menu (Félix, 22/09) */
  overflow: hidden;
  color: var(--vanilla, #F2E5D2);
}
/* Filet entre le menu et l'article : porté depuis le 08/10 par le menu
   lui-même (.site-header--v3 dans itsrugby-common.css), pour toutes les pages. */
/* Fil d'Ariane des articles : plus AFFICHÉ sur le site, mobile compris
   (Félix, 22/09 : « laisse que l'invisible »). Google lit le balisage
   BreadcrumbList de Rank Math, qui reste dans la page ; la pastille de
   rubrique mène déjà à la rubrique. Dans l'app, on GARDE les boutons « ‹ »
   et « Suivant » posés sur la photo (seul reste du fil d'Ariane là-bas,
   règles html.is-app d'itsrugby-article.css). La copie dans le bloc de texte
   (essai refusé) est masquée partout. */
.art-hero .art-hero__inner > nav.breadcrumb,
html:not(.is-app) .art-hero > nav.breadcrumb {
  display: none;
}
/* Site en MOBILE : mêmes boutons que dans l'app (Félix, 22/09 : « que l'on
   peut garder sur la version mobile »), posés en haut de la photo, sous
   l'en-tête du site. Style recopié des règles html.is-app d'itsrugby-
   article.css : pastille « ‹ » vers la rubrique, « Suivant › » à droite. Le
   texte du fil d'Ariane reste masqué. */
@media (max-width: 899px) {
  html:not(.is-app) .art-hero > nav.breadcrumb {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 10px 0 0;
    background: none;
    border: 0;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .container {
    min-height: 0;
    gap: 0;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .container > a:first-of-type:not(.bc-cat),
  html:not(.is-app) .art-hero > nav.breadcrumb .container > span[aria-hidden="true"],
  html:not(.is-app) .art-hero > nav.breadcrumb [aria-current="page"] {
    display: none;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-cat,
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
    text-decoration: none;
    background: rgba(28, 61, 52, 0.55);
    border: 1px solid rgba(242, 229, 210, 0.18);
    color: var(--vanilla, #F2E5D2);
  }
  /* Libellé masqué à l'œil, gardé pour les lecteurs d'écran. */
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-cat {
    width: 36px;
    padding: 0;
    font-size: 0;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-cat::before {
    content: "\2039";
    font-size: 26px;
    line-height: 1;
    color: var(--vanilla, #F2E5D2);
    position: relative;
    top: -2px;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-next {
    gap: 8px;
    margin-left: auto;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }
  html:not(.is-app) .art-hero > nav.breadcrumb .bc-next::after {
    content: "\203A";
    font-size: 26px;
    line-height: 1;
    font-weight: 400;
    color: var(--vanilla, #F2E5D2);
    position: relative;
    top: -2px;
  }
}
.art-hero__media {
  position: absolute;
  inset: 0;
}
.art-hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}
/* WPIO emballe l'image dans un <picture> (WebP) : sans la règle ci-dessus,
   height:100% se calcule sur un parent en ligne et la photo ne remplit pas. */
.art-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  /* Cadrage : --fx horizontal, --fy vertical (réglages de l'éditeur). */
  object-position: var(--fx, 50%) var(--fy, 30%);
}
/* Cadrage choisi dans l'éditeur (réglage « Cadrage de la photo ») : quelle
   partie de la photo reste visible quand elle est recadrée. Sans choix :
   50 % 30 % ci-dessus, calé vers le haut. Ajouté le 22/09 : sur un grand
   écran, le visage de Kevin Courties tombait derrière le titre. */
.art-hero--focus-haut {
  --fy: 8%;
}
.art-hero--focus-centre {
  --fy: 50%;
}
.art-hero--focus-bas {
  --fy: 88%;
}
/* Cadrage horizontal (22/09) : sujet à gauche ou à droite de la photo, pour
   le recentrer quand elle est recadrée dans une zone plus étroite. */
.art-hero--fx-gauche {
  --fx: 28%;
}
.art-hero--fx-droite {
  --fx: 72%;
}
/* Haut légèrement assombri (boutons Retour / Suivant de l'app posés sur la
   photo), milieu dégagé, bas dense sous le titre. */
.art-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(28, 61, 52, 0.5) 0%,
    rgba(28, 61, 52, 0) 22%);
  pointer-events: none;
}
.art-hero__head {
  position: relative;
  z-index: 1;
  /* Zone nette réservée à la photo avant le texte : avec le chapeau sur
     l'image, le texte occupait presque tout le hero et le voile recouvrait
     de nouveau la photo. */
  padding-top: min(260px, 34svh);
  padding-bottom: 22px;
  /* Voile porté par le bloc de texte : il suit sa hauteur, quelle que soit la
     longueur du titre et du chapeau. Transparent en haut (la photo reste
     nette), plus dense derrière le texte, où la photo transparaît encore. */
  background: linear-gradient(to bottom,
    rgba(28, 61, 52, 0) 0,
    rgba(28, 61, 52, 0.55) min(200px, 26svh),
    rgba(28, 61, 52, 0.82) 100%);
  text-shadow: 0 1px 12px rgba(28, 61, 52, 0.55);
}
.art-hero .art-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
/* Couleur portée par le conteneur : common.css force color:inherit sur les
   liens à classe (.its-v2 a[class]). */
.art-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--teal, #1C3D34);
}
.art-hero .art-hero__cat {
  /* Sauge comme les pastilles de la une (était vert vif, hors charte, 08/10). */
  background: var(--sage, #ABC8A2);
  color: var(--teal, #1C3D34);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  padding: 4px 9px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
}
.art-hero h1.art-hero__title {
  margin: 0;
  max-width: 22em;
  /* Mobile : 24 px environ (30 avant, il cachait la photo, remontée Félix
     du 22/09). L'ordinateur a sa propre taille plus bas. */
  font-size: clamp(22px, 6.2vw, 26px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--vanilla, #F2E5D2); /* charte : jamais de blanc pur (Félix, 22/09) */
  text-wrap: pretty;
}

/* Sans photo : bandeau vert profond, sans hauteur imposée. */
.art-hero--noimg {
  min-height: 0;
  background: var(--teal, #1C3D34);
}
.art-hero--noimg .art-hero__head {
  padding-top: 32px;
}

/* ── Sous le titre, sur la photo : chapeau, auteur, dates, légende ── */
.art-hero .art-lede__chapo {
  margin: 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: #F2E5D2;
}
/* Auteur, date et légende : sous le titre, sur la photo (demande Félix). */
.art-lede__meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}
.art-lede__avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage, #ABC8A2); /* était vert vif (08/10) */
  color: var(--teal, #1C3D34);
  font-size: 12px;
  font-weight: 800;
  text-shadow: none;
}
.art-lede__who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  line-height: 1.4;
  color: #F2E5D2;
}
.art-lede__author {
  font-size: 14px;
  font-weight: 700;
  color: #F2E5D2;
}
.art-lede__author a {
  color: inherit;
  text-decoration: none;
}
.art-lede__author a:hover,
.art-lede__author a:focus-visible {
  text-decoration: underline;
}
.art-hero .art-lede__caption {
  margin: 0;
  max-width: 760px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--vanilla, #F2E5D2);
}

/* ── Ordinateur : photo en plein fond, texte dans la colonne du site ──
   (Essai « photo à droite » du 22/09 refusé par Félix : on garde le plein
   fond.) */
@media (min-width: 900px) {
  /* Version cinéma : toute la hauteur visible sous l'en-tête du site. À
     560-630 px, le texte (titre, chapeau, auteur, légende) occupait les deux
     tiers du bas et recouvrait le sujet de la photo (Félix, 22/09). */
  .art-hero {
    min-height: max(640px, calc(100svh - 120px));
  }
  .art-hero:not(.art-hero--split) .art-hero__head {
    background: linear-gradient(to bottom,
      rgba(28, 61, 52, 0) 0,
      rgba(28, 61, 52, 0.5) 180px,
      rgba(28, 61, 52, 0.78) 100%);
  }
  .art-hero__head {
    padding-top: 240px;
    padding-bottom: 44px;
  }
  .art-hero .art-hero__inner {
    gap: 16px;
  }
  /* Piste A de Félix (22/09) : le texte occupe la largeur de la colonne du
     site au lieu de laisser la moitié droite vide. */
  .art-hero h1.art-hero__title {
    max-width: none;
    font-size: clamp(32px, 3vw, 44px); /* 60 px jugé trop gros (Félix, 22/09) */
    line-height: 1.08;
    letter-spacing: -0.025em;
  }
  /* Titre, chapeau et légende s'arrêtent tous au bord droit de la colonne
     du site (le chapeau s'arrêtait avant le titre, Félix 22/09). */
  .art-hero .art-lede__chapo,
  .art-hero .art-lede__caption {
    max-width: none;
  }
  .art-hero .art-lede__chapo {
    font-size: 19px;
  }
  /* 11 px lisible sur mobile, trop petit sur ordinateur (Félix, 22/09). */
  .art-hero .art-lede__caption {
    font-size: 13px;
  }
}

/* ── Ordinateur, photo de moins de 1 200 px (art-hero--split) ──
   Texte à gauche sur fond sombre, photo nette sur la moitié droite, fondue
   côté texte. Choisi automatiquement par hero-article.php (Félix, 22/09 :
   « on peut pas avoir les deux ? »). */
@media (min-width: 900px) {
  /* Largeur de la colonne de texte : au moins 440 px (sur un écran moyen,
     la photo à 65 % ne laissait que 390 px au titre, Félix 22/09). */
  .art-hero--split {
    --split-text: clamp(440px, 40vw, 580px);
    /* Chevauchement photo / texte : la photo passe TOUJOURS sous le texte
       (160 px au moins, 260 px sur grand écran) avec un long fondu. Sans
       chevauchement, le bord de la photo se voyait (Félix, 22/09 : rendu
       validé = photo sous le texte, fondu long). */
    --split-overlap: clamp(160px, (100vw - 1500px) * 0.9 + 160px, 260px);
    display: block;
    min-height: 480px;
  }
  /* Photo élargie à 65 % : moins de vert vide entre le texte et l'image
     sur les grands écrans (Félix, 22/09). */
  /* La photo commence à la fin de la colonne de texte (bord de la colonne du
     site + 24 px de marge + largeur du texte), moins un chevauchement qui
     n'apparaît qu'au-delà de 1 500 px (14 pouces : aucun, la photo laisse
     toute la place au texte) et plafonne à 240 px sur un grand écran. */
  .art-hero--split .art-hero__media {
    left: calc(max(0px, (100% - 1200px) / 2) + 24px + var(--split-text) - var(--split-overlap));
    width: auto;
    right: 0;
  }
  .art-hero--split .art-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Fondu proportionnel au chevauchement réel : dense sous le texte, puis
       140 px de transition. Deux fondus fixes (court / long, bascule à
       1 500 px) assombrissaient pour rien la photo juste au-dessus de
       1 500 px (Félix, 22/09 : « le fondu est moins beau »). */
    /* Dense sous le texte, puis 320 px de transition progressive. */
    background: linear-gradient(to right,
      #1C3D34 0,
      rgba(28, 61, 52, 0.9) var(--split-overlap),
      rgba(28, 61, 52, 0.65) calc(var(--split-overlap) + 80px),
      rgba(28, 61, 52, 0.35) calc(var(--split-overlap) + 170px),
      rgba(28, 61, 52, 0.12) calc(var(--split-overlap) + 250px),
      rgba(28, 61, 52, 0) calc(var(--split-overlap) + 320px));
    pointer-events: none;
  }
  .art-hero--split .art-hero__shade {
    display: none;
  }
  .art-hero--split .art-hero__head {
    background: none;
    text-shadow: none;
    padding-top: 64px;
    padding-bottom: 56px;
  }
  /* Colonne étroite : titre plus petit qu'en plein fond (4 lignes à 44 px). */
  .art-hero--split h1.art-hero__title {
    font-size: clamp(30px, 2.6vw, 38px);
  }
  .art-hero--split .art-hero__inner > *,
  .art-hero--split h1.art-hero__title,
  .art-hero--split .art-lede__chapo,
  .art-hero--split .art-lede__caption {
    max-width: var(--split-text);
  }
  .art-hero--split .art-lede__chapo {
    font-size: 18px;
  }
}

/* ── Article VIDÉO en mode cinéma (05/10/2026) ────────────────────
   Balisage : template-parts/hero-video-v2.php. Le haut d'article plein fond
   ci-dessus, tel quel ; en plus, un bouton « Regarder la vidéo ». Au clic
   (is-lecture, posée par its-media.js), l'en-tête s'efface et la vidéo
   occupe toute la surface, sur fond noir. */
.art-hero--video .art-hero__player {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
}
.art-hero--video.is-lecture .art-hero__player { display: block; }
/* Pause : la vidéo reste chargée (même position à la reprise) mais
   invisible ; l'image et l'en-tête reviennent. */
.art-hero--video.is-pause .art-hero__player {
  display: block;
  visibility: hidden;
  pointer-events: none;
}
.art-hero--video.is-lecture .art-hero__head,
.art-hero--video.is-lecture .art-hero__shade,
.art-hero--video.is-lecture .art-hero__media { visibility: hidden; }
.art-hero--video .art-hero__player > .its-media {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #000;
}
/* La vidéo garde ses proportions dans la surface (bandes noires au besoin). */
.art-hero--video .art-hero__player video { object-fit: contain; }
.art-hero--video .art-hero__player > .its-media.is-vertical {
  width: auto;
  height: 100%;
  max-height: none;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}
/* Mobile : en lecture, la surface prend la forme de la vidéo. */
.art-hero--video.is-lecture {
  min-height: 0;
  aspect-ratio: 16 / 9;
}
.art-hero--video.art-hero--vertical.is-lecture {
  aspect-ratio: auto;
  height: min(78svh, 720px);
}
/* Les boutons « ‹ » / « Suivant » de l'app restent au-dessus de l'image,
   pas de la vidéo en cours. */
.art-hero--video.is-lecture > nav.breadcrumb { display: none; }

.art-hero__format {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(242, 229, 210, 0.4);
  color: var(--vanilla, #F2E5D2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: none;
}
.art-hero .art-hero__play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  padding: 12px 18px 12px 14px;
  border: 0;
  background: var(--vanilla, #F2E5D2);
  color: var(--teal, #1C3D34);
  font-size: 14px;
  font-weight: 800;
  letter-spacing:0;
  text-transform:none;
  text-shadow: none;
  cursor: pointer;
}
.art-hero .art-hero__play:hover,
.art-hero .art-hero__play:focus-visible { background: #fff8ec; }
.art-hero__play-ico {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent currentColor;
}
.art-hero-transcript { padding: 14px 0 0; }

@media (min-width: 900px) {
  /* Ordinateur : un peu moins haut qu'un article (Félix, 05/10 : « peut-être
     un peu haut ») — l'en-tête entier tient à l'écran et le début de
     l'article affleure dessous. La vidéo s'y cale en lecture. */
  .art-hero.art-hero--video {
    min-height: max(560px, calc(86svh - 120px));
  }
  .art-hero.art-hero--video .art-hero__head {
    padding-top: 180px;
    padding-bottom: 36px;
  }
  .art-hero--video.is-lecture {
    aspect-ratio: auto;
    min-height: max(560px, calc(86svh - 120px));
  }
  .art-hero--video.art-hero--vertical.is-lecture { height: auto; }
}

/* ── Article PODCAST (05/10/2026) ─────────────────────────────────
   Balisage : template-parts/hero-podcast-v2.php = le haut des articles
   (mêmes mises en page « photo à droite » / « plein fond »), plus la
   pastille « Podcast · émission » et le lecteur sous le chapeau, posé à plat
   (ni boîte ni bordure), lecture en premier. Essais refusés par Félix le même
   jour : pochette carrée, photo à droite sur fond uni. */
.art-hero__audio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 560px;
  margin: 2px 0 4px;
}
.art-hero__audio-quoi {
  font-size: 12px;
  font-weight: 800;
  letter-spacing:0;
  text-transform:none;
  color: var(--vanilla, #F2E5D2);
}
.art-hero__audio .its-media.its-media--audio { background: transparent; border: 0; }
.art-hero__audio .its-media-a { padding: 0; }
.art-hero__audio .its-media-a-commandes { justify-content: flex-start; gap: 14px; max-width: none; margin: 10px 0 0; }
.art-hero__audio .its-media-a-jouer { order: -1; width: 56px; height: 56px; margin-right: 6px; }
/* Podcast, photo à droite (Félix, 05/10 : « toujours pas », photo pas
   centrée) : la photo d'un podcast est souvent un portrait presque carré.
   Étirée sur toute la zone de droite, le visage tombait sous le texte et un
   aplat vide restait à droite. Ici elle garde ses proportions, pleine
   hauteur, calée à droite, et se fond elle-même vers la gauche. */
@media (min-width: 900px) {
  .art-hero--audio.art-hero--split .art-hero__media::after { display: none; }
  .art-hero--audio.art-hero--split .art-hero__media img {
    width: auto;
    max-width: 100%;
    height: 100%;
    margin-left: auto;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%);
    mask-image: linear-gradient(to right, transparent 0, #000 40%);
  }
}

/* Haut de la photo : même fondu adouci que la une de la home et les archives
   sous le menu (Félix, 08/10 : une seule logique sur le site ; le filet a été
   jugé « moche » et retiré partout). Sous le texte (.art-hero__head z 1). */
.art-hero__shade::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 230px; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(28, 61, 52, 1) 0%,
    rgba(28, 61, 52, .82) 8%,
    rgba(28, 61, 52, .64) 17%,
    rgba(28, 61, 52, .48) 26%,
    rgba(28, 61, 52, .35) 36%,
    rgba(28, 61, 52, .24) 46%,
    rgba(28, 61, 52, .15) 57%,
    rgba(28, 61, 52, .08) 69%,
    rgba(28, 61, 52, .03) 83%,
    rgba(28, 61, 52, 0) 100%);
}
@media (max-width: 800px) { .art-hero__shade::before { height: 160px; } }
/* Dans l'app, pas de menu au-dessus : pas de fondu depuis le menu. */
html.is-app .art-hero__shade::before { display: none; }

/* Sans photo (blogs partenaires, 13/10/2026) : bandeau compact à TOUTES les
   tailles ; les hauteurs « plein écran » des media queries ci-dessus ne
   s'appliquent qu'avec une photo. */
.art-hero.art-hero--noimg { min-height: 0; }
.art-hero.art-hero--noimg .art-hero__head { padding-top: 40px; padding-bottom: 36px; }
/* Blog partenaire : colonne « Autres extraits » sans capitales espacées. */
.bp-aside .sidebar-box-title, .bp-aside .sidebar-link-cat { text-transform: none; letter-spacing: 0; }
.bp-aside .sidebar-box-title { font-size: 15px; }
/* Blog partenaire : encadré « Article complet sur » aux couleurs du site
   (plus de liseré vert vif ni de capitales espacées), partage en casse normale. */
.single-blog_partenaire .bp-source-cta { border: 0; border-left: 0; box-shadow: none; background: var(--teal, #1C3D34); color: var(--vanilla, #F2E5D2); padding: 22px 24px; }
.single-blog_partenaire .bp-source-cta-kicker { text-transform: none; letter-spacing: 0; font-size: 13px; color: rgba(242, 229, 210, .7); }
.single-blog_partenaire .bp-source-cta-name { color: var(--vanilla, #F2E5D2); font-size: 20px; }
.single-blog_partenaire .bp-source-cta-host { color: rgba(242, 229, 210, .7); }
.single-blog_partenaire .bp-source-cta-btn { background: var(--vanilla, #F2E5D2); color: var(--teal, #1C3D34); text-transform: none; letter-spacing: 0; }
.single-blog_partenaire .bp-source-cta-note { color: rgba(242, 229, 210, .65); border-top-color: rgba(242, 229, 210, .15); }
.single-blog_partenaire .share-btn, .single-blog_partenaire .bp-aside-list-all { text-transform: none; letter-spacing: 0; }
.single-blog_partenaire .bp-aside-list-all svg { display: none; }
/* Blog partenaire (Félix 13/10 : « pas besoin de l'avoir aussi haut ») :
   photo maison décorative, bandeau bas. */
.single-blog_partenaire .art-hero.art-hero--split,
.single-blog_partenaire .art-hero:not(.art-hero--noimg) { min-height: min(380px, 52svh); }
@media (max-width: 768px) {
  .single-blog_partenaire .art-hero.art-hero--split,
  .single-blog_partenaire .art-hero:not(.art-hero--noimg) { min-height: 0; }
}
.bp-aside .sidebar-box-title { border-bottom-color: var(--sage, #ABC8A2); }
