/* ============================================================
   proposition — nouveau site podcast.dopi.fr
   design aligné sur dopi.fr (Ubuntu, bleus, papier clair)
   structure : une page pleine par projet, façon simonbouisson.com
   ============================================================ */

@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/ubuntu-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ubuntu-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ubuntu-700.woff2') format('woff2');
}

:root {
  --b1: #8ECBF6;
  --b2: #64B5F5;
  --b3: #309DF3;
  --b4: #1E8AE7;
  --b5: #0B57A6;
  --ink: #0B2A45;
  --paper: #F4FAFF;
  --gris: #45586B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: 'Ubuntu', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---------- fond : image floutée + voile bleu, comme dopi.fr ---------- */

.fond {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--paper);
}

.fond::before {
  content: '';
  position: absolute;
  inset: -30px;
  background: url('images/fond.jpg') center / cover no-repeat;
  filter: saturate(.5) contrast(.85) brightness(1.2) blur(5px);
  opacity: .15;
}

.fond::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(244, 250, 255, .86) 0%,
    rgba(142, 203, 246, .5) 40%,
    rgba(48, 157, 243, .38) 74%,
    rgba(244, 250, 255, .84) 100%);
}

/* ---------- bandeau latéral : filet + nom vertical, motif de dopi.fr ---------- */

.titre-lateral {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: clamp(2.4rem, 4.5vw, 3.6rem);
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4.5vh;
  pointer-events: none;
}

.titre-lateral .rule {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(11, 42, 69, .28) 12%,
    rgba(11, 42, 69, .28) 88%,
    transparent 100%);
}

.titre-lateral .nom {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 300;
  font-size: clamp(.85rem, 1.15vw, 1.1rem);
  letter-spacing: .28em;
  white-space: nowrap;
  background: linear-gradient(to bottom, var(--b5), var(--b2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--b5);
}

a:hover {
  color: #1768B4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- chaque section est une page stable ---------- */

.hero,
.projet,
.presentation {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  display: flex;
}

/* ---------- haut de page : titre, extrait, mention ---------- */

.hero {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: space-between;
  row-gap: clamp(1.4rem, 4vh, 2.6rem);
  justify-items: center;
  padding: clamp(3.5rem, 12vh, 8rem) clamp(1.4rem, 6vw, 5rem);
  position: relative;
}

.logo-titre {
  display: inline-block;
  width: 40px;
  height: 40px;
  vertical-align: middle;
  margin-right: .5em;
  border-radius: .35rem;
  box-shadow: 0 8px 18px -10px rgba(11, 42, 69, .45);
  transform: translateY(-7px);
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(1.55rem, 3.4vw, 2.6rem);
  line-height: 1.28;
  letter-spacing: .01em;
  text-align: center;
  background: linear-gradient(to right, rgba(11, 87, 166, .98), rgba(23, 104, 180, .95));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mots-cles {
  margin-top: clamp(1.2rem, 3vh, 2.2rem);
  font-weight: 300;
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--b5);
  text-align: center;
}

/* extrait d'accueil : mention, lecteur, mention */

.hero-extrait {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 28rem;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(142, 203, 246, .4);
  border-radius: 1rem;
  padding: clamp(1.5rem, 3.5vw, 2.4rem) clamp(1.3rem, 3.5vw, 2.2rem);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  box-shadow:
    0 34px 64px -24px rgba(11, 42, 69, .35),
    0 12px 24px -12px rgba(30, 138, 231, .22);
}

.amorce {
  margin-bottom: clamp(1rem, 2.5vh, 1.6rem);
  font-weight: 300;
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--gris);
  text-align: center;
}

.hero-extrait .ecoute {
  width: 100%;
  margin-bottom: 0;
}

.hero-extrait figcaption {
  text-align: center;
  font-size: .93rem;
}

.suite {
  font-weight: 300;
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--gris);
  text-align: center;
}

/* ---------- blocs projets (maquette) ---------- */

/* ---------- blocs projets (maquette) : contenu accroché en haut ---------- */

.projet {
  flex-direction: column;
  justify-content: flex-start;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 5rem) clamp(1.4rem, 6vw, 5rem);
}

.annee {
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--b5);
  margin-bottom: 1.15rem;
}

.projet-grille {
  display: grid;
  grid-template-columns: 22% 28% minmax(0, 1fr);
  column-gap: clamp(1.25rem, 3.6vw, 3.6rem);
  align-items: start;
}

.visuel {
  position: relative;
  z-index: 2;
}

.visuel img {
  width: 100%;
  border-radius: 1rem;
  box-shadow:
    0 34px 64px -24px rgba(11, 42, 69, .45),
    0 12px 24px -12px rgba(30, 138, 231, .28);
  transition: transform .45s ease, box-shadow .45s ease;
}

.visuel:hover img {
  transform: translateY(-6px) scale(1.012);
  box-shadow:
    0 44px 80px -24px rgba(30, 138, 231, .5),
    0 16px 32px -12px rgba(11, 42, 69, .3);
}

.visuel--livre img {
  width: 75%;
}

.planisphere {
  grid-column: 2 / -1;
  max-width: 38rem;
  margin-top: clamp(.8rem, 2vh, 1.4rem);
}

.planisphere img {
  width: 100%;
  border-radius: 1rem;
  box-shadow:
    0 34px 64px -24px rgba(11, 42, 69, .4),
    0 12px 24px -12px rgba(30, 138, 231, .22);
}

.plan-chemin {
  grid-column: 2 / -1;
  max-width: 38rem;
  margin-top: clamp(1.8rem, 4vh, 3rem);
}

.plan-chemin img {
  width: 100%;
  border-radius: 1rem;
  box-shadow:
    0 34px 64px -24px rgba(11, 42, 69, .4),
    0 12px 24px -12px rgba(30, 138, 231, .22);
}

.plan-chemin figcaption {
  margin-top: .6em;
  font-size: .72rem;
  color: var(--gris);
}

/* alice : le lecteur s'aligne au niveau du paragraphe « Nous l'avons réalisé » */

@media (min-width: 901px) {
  .grille-alice .texte {
    display: contents;
  }

  .grille-alice .visuel {
    grid-column: 1;
    grid-row: 1 / span 5;
  }

  .grille-alice .texte p:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
  }

  .grille-alice .texte p:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
  }

  .grille-alice .texte p:nth-of-type(3) {
    grid-column: 2;
    grid-row: 3;
  }

  .grille-alice .texte p:nth-of-type(4) {
    grid-column: 2;
    grid-row: 4;
  }

  .grille-alice .texte p:nth-of-type(5) {
    grid-column: 2;
    grid-row: 5;
  }

  .grille-alice .ecoutes {
    grid-column: 3;
    grid-row: 4;
    margin-top: .92rem;
  }

  .grille-alice .plan-chemin {
    grid-column: 2 / -1;
    grid-row: 6;
  }
}

.texte {
  font-weight: 300;
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.55;
  color: var(--b5);
}

.texte p + p {
  margin-top: 1.05em;
}

.texte .sous {
  font-size: .88rem;
  color: var(--gris);
}

.texte .accroche {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.4;
}

/* ---------- colonne des écoutes : lecteurs fins ---------- */

.ecoutes .groupe {
  font-size: .68rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--b5);
  margin: 0 0 .8em;
}

.ecoutes .groupe + .groupe {
  margin-top: 1.5em;
}

.ecoute + .groupe {
  margin-top: 2em;
}

.ecoute {
  margin-bottom: 1.15rem;
}

.ecoute:last-child {
  margin-bottom: 0;
}

.ecoute audio:not([hidden]) {
  width: 100%;
  display: block;
}

.lecteur {
  display: none;
  align-items: center;
  gap: .85rem;
}

html.js .lecteur {
  display: flex;
}

.lecture {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lecture:hover {
  color: var(--b5);
}

.lecture::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}

.ecoute.en-cours .lecture::before {
  width: 9px;
  height: 11px;
  border: 0;
  margin-left: 0;
  background: linear-gradient(to right,
    currentColor 0 3px, transparent 3px 6px, currentColor 6px 9px);
}

.ligne {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 16px;
  background: transparent;
  cursor: pointer;
}

.ligne:focus {
  outline: none;
}

.ligne:focus-visible {
  outline: 2px solid var(--b3);
  outline-offset: 2px;
  border-radius: 4px;
}

.ligne::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--b3) var(--pos, 0%), rgba(11, 42, 69, .16) var(--pos, 0%));
}

.ligne::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border: 0;
  border-radius: 50%;
  background: var(--b4);
  opacity: 0;
  transition: opacity .15s ease;
}

.lecteur:hover .ligne::-webkit-slider-thumb,
.ligne:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.ligne::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(11, 42, 69, .16);
}

.ligne::-moz-range-progress {
  height: 2px;
  border-radius: 2px;
  background: var(--b3);
}

.ligne::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--b4);
}

.ecoute figcaption {
  margin-top: .45em;
  font-size: .85rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--gris);
}

.credits {
  margin-top: 1.6em;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--gris);
}

.accroche {
  font-size: 1.05rem;
}

.lien-plateformes {
  display: inline-block;
  margin-top: 1.4em;
  font-size: .82rem;
  font-weight: 400;
  color: var(--gris);
  text-decoration: underline;
  text-decoration-color: rgba(11, 42, 69, .22);
  text-underline-offset: 3px;
  transition: color .18s ease;
}

.lien-plateformes:hover {
  color: var(--b5);
  text-decoration-color: rgba(30, 138, 231, .5);
}

/* ---------- colonne des écoutes : corps légèrement plus gros ---------- */

#j-portraits .groupe,
#jrdc .groupe {
  font-size: .72rem;
}

#j-portraits .ecoute figcaption,
#jrdc .ecoute figcaption,
#moments .ecoute figcaption {
  font-size: .93rem;
}

#jrdc .credits,
#moments .credits {
  font-size: .9rem;
}

#jrdc .lien-plateformes,
#moments .lien-plateformes {
  font-size: .88rem;
}

/* ---------- bas de page : présentation ---------- */

.presentation {
  align-items: center;
  justify-content: center;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) clamp(1.4rem, 6vw, 5rem);
}

.presentation-inner {
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(142, 203, 246, .4);
  border-radius: 1.1rem;
  padding: clamp(1.6rem, 4.5vw, 3.2rem);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: 0 18px 38px -18px rgba(11, 42, 69, .28);
  width: 100%;
  max-width: 78rem;
}

.presentation h2 {
  font-weight: 300;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  color: var(--b5);
  margin-bottom: .75em;
}

.presentation .texte-p {
  font-weight: 300;
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.5;
  color: rgba(11, 42, 69, .9);
}

.presentation .texte-p p + p {
  margin-top: .85em;
}

.presentation a {
  color: var(--gris);
  text-decoration: underline;
  text-decoration-color: rgba(11, 42, 69, .22);
  text-underline-offset: 3px;
}

.presentation a:hover {
  color: var(--b5);
  text-decoration-color: rgba(30, 138, 231, .5);
}

.adieu {
  margin-top: 1.2em;
  font-weight: 300;
  font-size: .94rem;
  line-height: 1.6;
  color: rgba(11, 42, 69, .9);
}

.signature {
  margin-top: .7em;
  font-weight: 300;
  font-size: .95rem;
  letter-spacing: .34em;
  color: var(--gris);
}

/* ---------- bandeau de bas de page ---------- */

.bandeau {
  padding: 1.05rem clamp(1.4rem, 6vw, 5rem);
  font-size: .82rem;
  color: var(--gris);
  text-align: center;
  border-top: 1px solid rgba(142, 203, 246, .35);
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  scroll-snap-align: end;
}

.bandeau a {
  color: var(--gris);
  text-decoration: underline;
  text-decoration-color: rgba(11, 42, 69, .22);
  text-underline-offset: 3px;
  transition: color .18s ease;
}

.bandeau a:hover {
  color: var(--b5);
}

/* ---------- menu ---------- */

.menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding: 1.5rem clamp(1.4rem, 6vw, 5rem);
}

.menu a {
  display: inline-flex;
  align-items: center;
  font-size: .85rem;
  letter-spacing: .12em;
  color: var(--b5);
  text-decoration: none;
  transition: color .18s ease;
}

.menu a:hover {
  color: #1768B4;
}

.menu a:focus-visible {
  outline: 2px solid var(--b3);
  outline-offset: 3px;
  border-radius: 3px;
}

.menu-groupe {
  position: relative;
  display: flex;
  align-items: center;
}

.chevron {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: .5em;
  vertical-align: middle;
  border-style: solid;
  border-width: 4px 4px 0 4px;
  border-color: currentColor transparent transparent transparent;
  transition: transform .18s ease;
}

.menu-groupe.ouvert .chevron {
  transform: rotate(180deg);
}

.deroulant {
  list-style: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 15rem;
  max-width: 21rem;
  padding: .55rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(142, 203, 246, .4);
  border-radius: .9rem;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: 0 18px 38px -18px rgba(11, 42, 69, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.menu-groupe.ouvert .deroulant {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* repli sans JavaScript : survol souris et focus clavier */
@media (hover: hover) {
  .menu-groupe:hover .deroulant {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.menu-groupe:focus-within .deroulant {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.deroulant a {
  display: block;
  padding: .55em .75em;
  border-radius: .55rem;
  letter-spacing: .02em;
  line-height: 1.45;
}

.deroulant a:hover {
  background: rgba(142, 203, 246, .28);
  color: var(--b5);
}

/* ---------- apparition douce (uniquement si le JS est actif) ---------- */

html.js .apparait {
  opacity: 0;
  transition: opacity .9s ease;
}

html.js .apparait.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
  html.js .apparait {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .visuel img {
    transition: none;
  }
}

/* ---------- petits écrans : défilement libre ---------- */

@media (max-width: 900px) {
  html {
    scroll-snap-type: none;
  }

  .titre-lateral {
    display: none;
  }

  .menu {
    gap: 1.1rem;
    padding: 1rem 1.2rem;
    background: rgba(244, 250, 255, .92);
  }

  /* allègement : pas de verre dépoli en défilement sur mobile */
  .hero-extrait {
    background: rgba(255, 255, 255, .38);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .presentation-inner {
    background: rgba(255, 255, 255, .58);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bandeau {
    background: rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero,
  .projet,
  .presentation {
    min-height: 0;
  }

  .hero {
    min-height: 100svh;
    padding-top: clamp(4.5rem, 13vh, 7rem);
    padding-bottom: clamp(1.5rem, 5vh, 3rem);
    row-gap: clamp(1.2rem, 3vh, 1.8rem);
  }

  .projet-grille {
    grid-template-columns: 1fr;
    row-gap: 2.2rem;
    align-items: start;
  }

  .visuel img {
    max-width: 22rem;
  }

  .ecoutes {
    max-width: 34rem;
  }

  .planisphere,
  .plan-chemin {
    grid-column: auto;
  }
}

@media (max-height: 640px) {
  html {
    scroll-snap-type: none;
  }

  .hero,
  .projet,
  .presentation {
    min-height: 0;
  }
}
