/* ============================================================
   FEIJUY — Thème SPIP sur mesure pour julienferrand.fr
   Style : Netflix éducatif
   ============================================================ */

/* ── Reset & variables ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #e50914;
  --black:      #141414;
  --dark:       #181818;
  --darker:     #0d0d0d;
  --card-bg:    #2a2a2a;
  --white:      #ffffff;
  --gray:       #b3b3b3;
  --light-bg:   #f5f5f5;
  --nav-h:      68px;
  --radius:     4px;
  --font:       'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 4%;
  gap: 2rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.9) 0%, transparent 100%);
  transition: background .4s;
}

.navbar.is-scrolled { background: var(--darker); }

.navbar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 40px;
  width: auto;
  display: block;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
}

.navbar__nav li a {
  font-size: .875rem;
  color: #e5e5e5;
  transition: color .15s;
  white-space: nowrap;
}
.navbar__nav li a:hover,
.navbar__nav li a.active { color: var(--white); }

/* Lien YouTube dans la nav : icône rouge, texte comme les autres */
.navbar__nav .nav-yt {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.navbar__nav .nav-yt svg {
  flex-shrink: 0;
  color: var(--red);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}

.navbar__actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
}

.navbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: #5a4fb5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  flex-shrink: 0;
}

/* ── BARRE DE RECHERCHE ─────────────────────────────────────── */
.navbar__search-bar {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1rem 4%;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: searchSlideDown .18s ease;
}

.navbar__search-bar[hidden] { display: none; }

.navbar.is-scrolled .navbar__search-bar {
  background: var(--darker);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.navbar__search-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: .5rem 1rem;
}

.navbar__search-form svg { flex-shrink: 0; color: var(--gray); }

.navbar__search-form input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: .95rem;
  font-family: var(--font);
}

.navbar__search-form input[type="search"]::placeholder { color: var(--gray); }
.navbar__search-form input[type="search"]::-webkit-search-cancel-button { display: none; }

.navbar__search-submit {
  background: var(--red);
  border: none;
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

#navbar-search-close {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#navbar-search-close:hover { color: var(--white); }

/* ── PAGE RECHERCHE ─────────────────────────────────────────── */
.search-hero { padding: calc(var(--nav-h) + 3rem) 4% 2rem; }
.search-hero__label {
  font-size: .8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.search-hero__query {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
}
.search-hero__count { color: var(--gray); margin-top: .4rem; font-size: .9rem; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 85vh;
  min-height: 520px;
  max-height: 900px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Adaptive Images enveloppe les <img> dans un <picture> et injecte
   img.adapt-img{height:auto} avec la même spécificité mais après ce CSS.
   On surclasse avec une spécificité plus haute sur les deux sélecteurs. */
.hero__bg picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.hero__bg picture img,
.hero__bg img.adapt-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 30%;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(0,0,0,.80) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(to top,    rgba(26,26,26,1) 0%, rgba(26,26,26,0) 55%),
    linear-gradient(to bottom, rgba(0,0,0,.50) 0%, rgba(0,0,0,0) 18%);
}

.hero__badge {
  position: absolute;
  bottom: 16%;
  right: 0;
  background: rgba(0,0,0,.65);
  border: none;
  border-left: 4px solid var(--gray);
  padding: .55rem 1.8rem .55rem 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  border-radius: 0;
  backdrop-filter: blur(8px);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero__content {
  position: absolute;
  bottom: 16%;
  left: 4%;
  max-width: 48%;
}

.hero__title {
  font-size: clamp(1.6rem, 2.8vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.08;
  text-shadow: 2px 2px 10px rgba(0,0,0,.7);
  margin-bottom: 1rem;
}

.hero__desc {
  font-size: .95rem;
  color: #ddd;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 5px rgba(0,0,0,.9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__buttons { display: flex; gap: .85rem; flex-wrap: wrap; }

/* ── BOUTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.6rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .15s;
  line-height: 1;
}
.btn:hover { opacity: .85; transform: scale(1.02); }
.btn:active { transform: scale(.98); }

.btn--primary  { background: var(--white);                color: var(--black); }
.btn--secondary{ background: rgba(109,109,110,.7);        color: var(--white); backdrop-filter: blur(4px); }

/* ── SECTIONS GÉNÉRIQUES ─────────────────────────────────────── */
.row {
  padding: 2.5rem 4%;
  position: relative;
}

.row--light   { background: var(--light-bg); }
.row--dark    { background: #1a1a1a; }

.row__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.row__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}
.row--light .row__title { color: var(--black); }

.row__more {
  font-size: .8rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: opacity .2s;
}
.row__more:hover { opacity: .7; }

/* ── CARROUSEL HORIZONTAL ────────────────────────────────────── */
.scroll-row {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px 30px 40px;
  margin: -12px -30px -40px;
}
.scroll-row::-webkit-scrollbar { display: none; }

/* ── CARTE ARTICLE ───────────────────────────────────────────── */
.card {
  display: block;
  flex-shrink: 0;
  width: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  background: var(--card-bg);
  position: relative;
  transition: transform .25s, box-shadow .25s;
}

.card:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 30px rgba(0,0,0,.6);
  z-index: 10;
}

.card__img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #333;
}

.card__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transition: transform .35s;
}
.card:hover .card__img img { transform: scale(1.08); }

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: .7rem .6rem;
}

.card__title {
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--white);
}

.card__overlay { flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .15rem; }

.card__rubrique {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,.85);
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .18rem .45rem;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
}

.card__badge {
  position: absolute;
  top: .4rem;
  left: .4rem;
  background: var(--red);
  color: var(--white);
  font-size: .6rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── SECTION PAR CLASSE ──────────────────────────────────────── */
.classes-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.class-block {
  min-width: 0;
  overflow: hidden;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.class-block .card:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.2);
}

.class-block__watermark {
  position: absolute;
  bottom: -1rem;
  left: 0.5rem;
  font-size: clamp(2rem, 8.5vw, 8rem);
  font-weight: 900;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,.18);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.class-block__inner {
  position: relative;
  z-index: 1;
  margin-left: 8rem;
}

.class-block__inner .card { width: 100%; max-width: 260px; }

.class-block__label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .5rem;
}

/* ── BOUTONS CARROUSEL ───────────────────────────────────────── */
.scroll-row-wrap {
  position: relative;
}

.scroll-btn {
  display: none; /* activé en JS si besoin */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(20,20,20,.8);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.scroll-btn:hover { background: rgba(40,40,40,.95); }
.scroll-btn--prev { left: -18px; }
.scroll-btn--next { right: -18px; }

/* ── PAGE RUBRIQUE ────────────────────────────────────────────── */
.rubrique-hero {
  position: relative;
  padding: calc(var(--nav-h) + 3rem) 4% 3rem;
  background: linear-gradient(to bottom, var(--darker), var(--black));
  overflow: hidden;
}

.rubrique-hero__watermark {
  position: absolute;
  bottom: -1.5rem;
  right: 3%;
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 900;
  font-style: italic;
  color: rgba(255,255,255,.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.rubrique-hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: var(--white);
}

.rubrique-hero__desc {
  color: var(--gray);
  max-width: 600px;
  margin-top: .75rem;
  font-size: 1rem;
}

.rubrique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .6rem;
  padding: 2rem 4%;
}

.rubrique-grid .card { width: 100%; }

/* ── PAGE ARTICLE ─────────────────────────────────────────────── */
.article-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.article-hero__bg {
  position: absolute;
  inset: 0;
}
.article-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.article-hero__bg picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.article-hero__bg picture img,
.article-hero__bg img.adapt-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 30%;
}

.article-hero__gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.5) 0%, transparent 40%),
    linear-gradient(to top,    rgba(20,20,20,1) 0%, transparent 50%);
}

.article-meta {
  position: absolute;
  bottom: 2rem;
  left: 4%;
  right: 4%;
}

.article-meta__class {
  font-size: .8rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  text-shadow: 0px 0px 15px rgba(0, 0, 0, 1);
  letter-spacing: .1em;
  margin-bottom: .5rem;
}

.article-meta__title {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 2px 2px 8px rgba(0,0,0,.6);
  max-width: 800px;
}

.article-meta__desc {
  font-size: .95rem;
  color: #ddd;
  line-height: 1.65;
  max-width: 600px;
  margin-top: .75rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,.6);
}

.article-body {
  padding: 2.5rem 4%;
  max-width: 900px;
  margin: 0 auto;
}

.article-body__chapo {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 2rem;
  border-left: 3px solid var(--red);
  padding-left: 1rem;
}

.article-body__texte {
  font-size: 1rem;
  line-height: 1.8;
  color: #e0e0e0;
}

.article-body__texte h2,
.article-body__texte h3,
.article-body__texte h4 { margin: 2rem 0 .75rem; color: var(--white); font-weight: 700; line-height: 1.3; }
.article-body__texte h2 { font-size: 1.5rem; border-left: 3px solid var(--red); padding-left: .6rem; }
.article-body__texte h3 { font-size: 1.2rem; }
.article-body__texte h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray); }
.article-body__texte p  { margin-bottom: 1rem; }
.article-body__texte a  { color: var(--red); text-decoration: underline; }

.article-body__date {
  font-size: .8rem;
  color: var(--gray);
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

/* ── CARTE GOOGLE DRIVE ──────────────────────────────────────── */
.drive-card {
  display: flex;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: border-color .2s;
}
.drive-card:has(*:hover),
.drive-card:focus-within {
  border-color: rgba(255,255,255,.18);
}

/* Lien principal (ouvrir) */
.drive-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem;
  color: var(--white);
  text-decoration: none;
  transition: background .2s;
}
.drive-card__main:hover { background: #333; }
.drive-card__main:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.drive-card__thumb {
  flex-shrink: 0;
  width: 108px;
  height: 72px;
  border-radius: 3px;
  overflow: hidden;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drive-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Icône de fallback si le thumbnail échoue */
.drive-card__thumb--error img { display: none; }
.drive-card__thumb--error::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 87.3 78' fill='%23555'%3E%3Cpath d='M6.6 66.85l3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3L27.5 53H0c0 1.55.4 3.1 1.2 4.5z'/%3E%3Cpath d='M43.65 25L29.9 1.2C28.55.4 27 0 25.45 0c-1.55 0-3.1.4-4.5 1.2L6.6 25z'/%3E%3Cpath d='M73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75L86.1 57.5c.8-1.4 1.2-2.95 1.2-4.5H59.3l5.65 13.65z'/%3E%3Cpath d='M43.65 25L57.4 1.2C56 .4 54.45 0 52.9 0H34.4c-1.55 0-3.1.4-4.5 1.2z'/%3E%3Cpath d='M59.3 53H27.5L13.75 76.8c1.4.8 2.95 1.2 4.5 1.2h50.8c1.55 0 3.1-.4 4.5-1.2z'/%3E%3Cpath d='M43.65 25H6.6L.45 36.35C-.35 37.75-.35 39.4.45 40.8L6.6 51.35 27.5 53 59.3 53l20.9-1.65 6.15-10.55c.8-1.4.8-3.05 0-4.45L80.2 25z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.drive-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.drive-card__ext {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  padding: .15rem .45rem;
  border-radius: 2px;
  align-self: flex-start;
}
.drive-card__title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--white);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.drive-card__icon {
  flex-shrink: 0;
  color: var(--gray);
  transition: color .2s;
}
.drive-card__main:hover .drive-card__icon { color: var(--white); }

/* Bouton téléchargement */
.drive-card__dl {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 1rem;
  border-left: 1px solid rgba(255,255,255,.08);
  color: var(--gray);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.drive-card__dl:hover {
  color: var(--white);
  background: rgba(255,255,255,.06);
}
.drive-card__dl:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

/* ── LECTEUR VIDÉO GOOGLE DRIVE ─────────────────────────────── */
.drive-video {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.drive-video__wrap {
  position: relative;
  padding-top: 56.25%; /* ratio 16:9 */
}
.drive-video__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.drive-video__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem .5rem 1rem;
  background: var(--card-bg);
  border-top: 1px solid rgba(255,255,255,.06);
}
.drive-video__title {
  flex: 1;
  min-width: 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drive-video__dl {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .35rem;
  border-radius: 3px;
  color: var(--gray);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.drive-video__dl:hover {
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.drive-video__dl:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: var(--darker);
  padding: 3rem 4% 2rem;
  color: var(--gray);
  font-size: .85rem;
}

.footer__inner { max-width: 700px; margin: 0 auto; text-align: center; }

.footer__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer__social a {
  color: var(--gray);
  transition: color .2s;
  display: flex;
}
.footer__social a:hover { color: var(--white); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 2rem;
  margin-bottom: .75rem;
}

.footer__links a {
  color: var(--gray);
  transition: color .2s;
}
.footer__links a:hover { color: var(--white); }

.footer__copy {
  margin-top: 1.25rem;
  font-size: .75rem;
  color: #555;
}

/* ── UTILITAIRES ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* Hamburger — invisible sur desktop */
.navbar__burger { display: none; }

/* ── Tablette 900px ── */
@media (max-width: 900px) {
  .navbar__nav { gap: .75rem; }
  .hero__content { max-width: 70%; }
  .classes-row { grid-template-columns: repeat(2, 1fr); }
  .class-block__inner { margin-left: 4rem; }
}

/* ── Mobile 640px ── */
@media (max-width: 640px) {
  /* Hamburger */
  .navbar__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
  }
  .navbar__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
  }
  .navbar--open .navbar__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navbar--open .navbar__burger span:nth-child(2) { opacity: 0; }
  .navbar--open .navbar__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .navbar__actions { margin-left: auto; }

  /* Menu mobile : dropdown absolu */
  .navbar__nav {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13,13,13,.97);
    backdrop-filter: blur(8px);
    padding: .5rem 5% 1rem;
    gap: 0;
    transform: translateY(-110%);
    transition: transform .3s ease;
    z-index: 89;
  }
  .navbar--open .navbar__nav { transform: translateY(68px); }
  .navbar__nav li { border-bottom: 1px solid rgba(255,255,255,.07); }
  .navbar__nav li:last-child { border-bottom: none; }
  .navbar__nav li a { font-size: 1rem; padding: .8rem 0; display: block; }

  /* Hero */
  .hero__content { max-width: 90%; }
  .hero__badge   { display: none; }
  .hero__title   { font-size: 1.5rem; }

  /* Sections */
  .row { padding: 1.5rem 4%; }
  .row__title { font-size: 1.15rem; }

  /* Classes — scroll horizontal sur mobile */
  .classes-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: .75rem;
    padding-bottom: 1rem;
  }
  .classes-row::-webkit-scrollbar { display: none; }

  .class-block {
    flex-shrink: 0;
    width: 72vw;
    max-width: 280px;
    min-height: 160px;
    scroll-snap-align: start;
  }

  .class-block__watermark {
    bottom: 0; /* évite le débordement coupé par overflow:hidden */
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .class-block__inner { margin-left: 4.5rem; }

  /* Rubrique */
  .rubrique-grid { grid-template-columns: repeat(2, 1fr); }

  /* Article hero */
  .article-hero { height: 50vh; min-height: 280px; }
}

/* ── Petit mobile 480px ── */
@media (max-width: 480px) {
  .rubrique-grid { grid-template-columns: 1fr; }
  .article-meta__title { font-size: 1.3rem; }
  .hero { min-height: 420px; }
  .hero__desc { -webkit-line-clamp: 2; }
}

/* ── IMAGES DANS LES ARTICLES (plugin Adaptive Images) ─────── */
/* 1. Efface le fond blanc et la bordure du thème dist sur .spip_document.
   2. S'assure que le conteneur est un parent positionné pour le trick
      padding-bottom du plugin.
   3. Corrige height:auto (global img{}) qui écrase height:100% du plugin
      sur l'image absolument positionnée. */
.spip_document, .spip_documents {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 1.5rem 0;
}
.conteneur_image_responsive_h {
  position: relative;
  display: block;
}
img.image_responsive {
  height: 100% !important;
}

/* ── LÉGENDE DOCUMENTS (oEmbed vidéo, etc.) ─────────────────── */
.spip_doc_legende { text-align: center; }
.spip_document .oembed, .spip_documents .oembed { background-color: transparent!important;border: transparent!important; }

/* ── PLAYER YOUTUBE (tarteaucitron) ─────────────────────────── */
/* tarteaucitron injecte un <iframe width="700" height="394"> avec
   des dimensions fixes — on le force en responsive 16/9.        */
.youtube_player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.youtube_player iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.spip_doc_titre {width: 100%;max-width: none!important;margin-bottom: 15px;}

/* ── ALIGNEMENT TEXTE (balises Ferrix) ───────────────────────── */
/* Utilisation dans l'article : <droite>…</droite>               */
.ferrand-droite  { text-align: right; }
.ferrand-gauche  { text-align: left; }
.ferrand-justifie { text-align: justify; }

/* ── APERÇU DE LIEN (Open Graph) ────────────────────────────── */
.link-preview {
  display: flex;
  gap: 0;
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  margin: 1.5rem 0;
  transition: background .2s, border-color .2s;
}
.link-preview:hover { background: #242424; border-color: #444; }

.link-preview__img {
  flex-shrink: 0;
  width: 160px;
  overflow: hidden;
}
.link-preview__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-preview__body {
  flex: 1;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  overflow: hidden;
  min-width: 0;
}

.link-preview__site {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.link-preview__favicon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: contain;
  flex-shrink: 0;
}

.link-preview__title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-preview__desc {
  font-size: .8rem;
  color: var(--gray);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 540px) {
  .link-preview { flex-direction: column; }
  .link-preview__img { width: 100%; height: 140px; }
}

/* ── HERO CARROUSEL ──────────────────────────────────────────── */
.hero-carousel {
  position: relative;
  height: 85vh;
  min-height: 520px;
  max-height: 900px;
  overflow: hidden;
}

/* Chaque slide est empilé en absolu dans le carrousel */
.hero-carousel .hero {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: unset;
  max-height: unset;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}

.hero-carousel .hero.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Barre de navigation : dots + flèches */
.hero-carousel__nav {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  z-index: 20;
}

/* Conteneur frosted-glass qui relie visuellement tous les dots */
.hero-carousel__dots {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 5px 7px;
}

/* Dot inactif : petit cercle */
.hero-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 20px;
  background: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: width .45s cubic-bezier(.4, 0, .2, 1),
              background .35s ease;
}

/* Dot actif : s'étire en pill */
.hero-carousel__dot.is-active {
  width: 26px;
  background: var(--white);
}

.hero-carousel__btn {
  background: rgba(20,20,20,.72);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .2s;
  padding: 0;
  flex-shrink: 0;
}

.hero-carousel__btn:hover { background: rgba(50,50,50,.95); }

/* ── TUILES CLASSES (style Disney+ × Netflix) ───────────────── */
.brands-section { padding-bottom: 3rem; }

.brands-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  gap: .3rem;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .25s, box-shadow .3s, border-color .3s;
}

.brand-tile:hover { transform: scale(1.04); }

/* Halo coloré — se propage depuis le coin haut-gauche au hover */
.brand-tile::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -15%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  opacity: .38;
  filter: blur(28px);
  transition: width .55s ease, height .55s ease;
  pointer-events: none;
}
.brand-tile:hover::before {
  width: 80%;
  height: 80%;
}

/* Reflet glass discret */
.brand-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,0) 55%);
  pointer-events: none;
}

/* Identité par classe : fond sombre teinté + glow hover */
.brand-tile--6 {
  background: linear-gradient(140deg, #1f1506 0%, var(--black) 58%);
  border-color: rgba(217,119,6,.18);
}
.brand-tile--6::before { background: #d97706; }
.brand-tile--6:hover {
  box-shadow: 0 0 0 1px rgba(217,119,6,.38), 0 14px 44px rgba(217,119,6,.2);
  border-color: rgba(217,119,6,.38);
}

.brand-tile--5 {
  background: linear-gradient(140deg, #06101f 0%, var(--black) 58%);
  border-color: rgba(59,130,246,.18);
}
.brand-tile--5::before { background: #3b82f6; }
.brand-tile--5:hover {
  box-shadow: 0 0 0 1px rgba(59,130,246,.38), 0 14px 44px rgba(59,130,246,.2);
  border-color: rgba(59,130,246,.38);
}

.brand-tile--4 {
  background: linear-gradient(140deg, #061506 0%, var(--black) 58%);
  border-color: rgba(34,197,94,.18);
}
.brand-tile--4::before { background: #22c55e; }
.brand-tile--4:hover {
  box-shadow: 0 0 0 1px rgba(34,197,94,.38), 0 14px 44px rgba(34,197,94,.2);
  border-color: rgba(34,197,94,.38);
}

.brand-tile--3 {
  background: linear-gradient(140deg, #13061e 0%, var(--black) 58%);
  border-color: rgba(168,85,247,.18);
}
.brand-tile--3::before { background: #a855f7; }
.brand-tile--3:hover {
  box-shadow: 0 0 0 1px rgba(168,85,247,.38), 0 14px 44px rgba(168,85,247,.2);
  border-color: rgba(168,85,247,.38);
}

.brand-tile__num {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  font-style: italic;
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--white);
  position: relative;
  z-index: 1;
}

.brand-tile__num sup {
  font-size: .42em;
  vertical-align: super;
  font-style: normal;
}

.brand-tile__label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.4);
  position: relative;
  z-index: 1;
}

/* ── Responsive carrousel + tuiles ──────────────────────────── */
@media (max-width: 900px) {
  .brands-row { gap: .75rem; }
}

@media (max-width: 640px) {
  /* Flèches masquées sur mobile, les dots suffisent */
  .hero-carousel__btn { display: none; }

  .brands-row {
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
  }

  .brand-tile { border-radius: 7px; }
}

@media (max-width: 380px) {
  .brands-row { gap: .4rem; }
}
