    body{
  background-color: #fDfDfD;
}


h1{
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size:2.5rem;
  padding-left:1em
}
    

h3{
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size:1.5rem;
}
    
h2{
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size:1.5rem;
}
  
#intro{
  font-family: "EB Garamond", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size:1.3em;
  margin-left:10rem;
}

#intro p{
  width:60%;      
}


.content{
  font-family: "EB Garamond", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size:1.3em;
  margin-left:10rem;
    width:60%;   

}

    .scroll__section {
      position: relative;
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      padding: 1rem;
    }

    .scroll__section>* {
      -webkit-box-flex: 1;
      -ms-flex: 1;
      flex: 1;
    }

    article {
      position: relative;
      padding: 0 1rem;
      max-width: 40rem;
    }

    figure {
      position: -webkit-sticky;
      position: sticky;
      width: 100%;
      margin: 0;
      -webkit-transform: translate3d(0, 0, 0);
      -moz-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      z-index: 0;
      /* border-style: solid;
      border-color: red; */
    }

    figure p {
      text-align: center;
      padding: 1rem;
      position: absolute;
      top: 50%;
      left: 50%;
      -moz-transform: translate(-50%, -50%);
      -webkit-transform: translate(-50%, -50%);
      transform: translate(-50%, -50%);
      font-size: 8rem;
      font-weight: 900;
    }

    .step {
      margin: 0 auto 2rem auto;
      opacity: 0.3;
    }

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

    .step.is-active {
      opacity:1;
    }

    
    .step h2 {
      text-align: center;
      padding: 1rem;
      font-size: 1.5rem;
    }
    .step p {
       color:#000;
       font-size:1.3rem;
       font-family: "EB Garamond", serif;
         font-optical-sizing: auto;
         font-weight: 500;
         font-style: normal;
         padding-left:1rem;
         padding-right:1rem;
         text-align: justify;
    }

svg text.label{
  text-anchor: middle;
  dominant-baseline: bottom;
  font-weight:800;
  font-size:1.2em;
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  filter: url(#outline);
}

/* ------------------------------------------------------------------
   Code couleur du texte, identique à celui des graphiques
   ------------------------------------------------------------------ */
.prive  { color: #4e79a7; font-weight: 600; }
.public { color: #59a14f; font-weight: 600; }
.rep    { color: #f28e2b; font-weight: 600; }

.step img { display: block; width: 100%; margin-top: 0.5rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.duo .ph img { margin-top: 0; height: 160px; object-fit: cover; }
.cap { display: block; margin-top: 0.25rem; font-family: Helvetica, Arial, sans-serif; font-size: 0.72rem; line-height: 1.25; color: #666; text-align: left; }
.cap a { color: inherit; }

/* Graphique 1 : barres de décomposition */
svg .bar-title { font-family: "Oswald", sans-serif; font-size: 15px; font-weight: 600; fill: #222; }
svg .bar-value { font-family: "Oswald", sans-serif; font-size: 15px; font-weight: 600; fill: #fff; text-anchor: middle; dominant-baseline: central; }
svg .bar-label { font-family: "Oswald", sans-serif; font-size: 14px; font-weight: 500; }

/* Graphique 2 : légende et étiquettes de villes */
svg .legend-text { font-family: "Oswald", sans-serif; font-size: 10px; font-weight: 500; fill: #222; }
svg .legend-tick { font-size: 9px; }
svg .map-label {
  font-family: "Oswald", sans-serif; font-size: 17px; font-weight: 600; fill: #111;
  text-anchor: middle; dominant-baseline: central;
  paint-order: stroke; stroke: #fdfdfd; stroke-width: 4px; stroke-linejoin: round;
  pointer-events: none;
}

#intro p.chapo { font-size: 1.2em; font-weight: 600; line-height: 1.35; }

/* Conclusion, méthode, crédits */
#outro, #outro2 {
  font-family: "EB Garamond", serif;
  font-weight: 500;
  font-size: 1.3em;
  margin: 6rem 0 4rem 10rem;
  width: 60%;
  max-width: 44rem;
}
#outro h2, #outro2 h2 { font-size: 1.8rem; }
#outro a, #outro2 a, .step a, #intro a { color: inherit; text-decoration-color: #999; text-underline-offset: 0.15em; }
#methode { margin-top: 3rem; padding: 1rem 1.2rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85em; }
#methode summary { font-family: "Oswald", sans-serif; font-weight: 600; cursor: pointer; }
.credits { margin-top: 2rem; font-size: 0.8em; color: #666; }

/* Étape « table PCS → IPS » : étiquettes et infobulle */
#pcs .pcs-label { font-size: 13px; paint-order: stroke; stroke: #fdfdfd; stroke-width: 5px; stroke-linejoin: round; }
#pcs .pcs-label .v { fill: #555; font-weight: 400; }
#pcs .pcs-note { font-size: 12px; fill: #777; }
#tip-pcs { position: fixed; z-index: 10; display: none; pointer-events: none; max-width: 260px; background: #fff; border: 1px solid #bbb; border-radius: 6px; padding: .45rem .65rem; font-size: 13px; line-height: 1.35; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
#tip-pcs b { font-size: 15px; }
#tip-pcs hr { border: 0; border-top: 1px solid #ddd; margin: .35rem 0; }
#tip-pcs i { display: block; color: #777; font-style: normal; font-size: 11px; }

/* ------------------------------------------------------------------
   Mobile et petites fenêtres : figures plein écran, fixes ; le texte, en
   cartes, défile par-dessus puis laisse la figure seule à l'écran.
   ------------------------------------------------------------------ */
img { max-width: 100%; height: auto; }

@media (max-width: 800px) {
  body { margin: 0; }

  h1 { font-size: 1.9rem; padding-left: 0; line-height: 1.15; }
  h3 { font-size: 1.2rem; }

  #intro, .content { margin: 0; padding: 1.2rem; width: auto; font-size: 1.15em; }
  #intro p { width: auto; }
  #intro p.chapo { font-size: 1.1em; }

  .scroll__section { display: flex; flex-direction: column; padding: 0; }
  .scroll__section > * { flex: none; }

  /* la figure, collée à l'écran, prend toute la hauteur */
  figure {
    order: -1;
    position: -webkit-sticky; position: sticky; top: 0;
    width: 100%; box-sizing: border-box;
    height: 100vh; height: 100svh;
    padding: 0.4rem 0.4rem 0;
    background-color: #fDfDfD;
    z-index: 0;
  }
  figure svg { height: 100%; }

  /* le texte remonte de 100 % de l'écran : il recouvre la figure en défilant */
  article {
    position: relative; z-index: 2;
    margin-top: -100vh; margin-top: -100svh;
    max-width: none; padding: 0 0.8rem;
  }

  .step {
    opacity: 1;
    min-height: 0 !important;
    margin: 0 0 85vh; margin: 0 0 85svh;          /* long espace : la figure reste seule à l'écran */
    padding: 0.2rem 1rem 1rem;
    background: rgba(253, 253, 253, 0.94);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  }
  article .step:first-child { margin-top: 55vh; margin-top: 55svh; }   /* figure visible avant la première carte */
  article .step:last-child { margin-bottom: 45vh; margin-bottom: 45svh; }

  .step h2 { font-size: 1.2rem; padding: 0.8rem 0 0.3rem; text-align: left; }
  .step p { font-size: 1.05rem; line-height: 1.35; padding: 0; text-align: left; margin: 0.4rem 0; }
  .step img { border-radius: 4px; }
  .duo { gap: 0.4rem; }
  .duo .ph img { height: 16vh; height: 16svh; }
  .cap { font-size: 0.68rem; }

  /* tailles dans l'espace du SVG (réduit à environ 0,7 pour la courbe, 0,5 pour la carte) */
  #graph1 .tick text { font-size: 14px; }
  #graph1 .axis-title { font-size: 15px; }
  #graph1 g.col path { stroke-width: 2px; }
  #graph1 text.label { font-size: 19px; }
  #pcs .pcs-label { font-size: 15px; }
  #pcs .pcs-note { font-size: 14px; }
  svg .bar-title { font-size: 16px; }
  svg .bar-value { font-size: 15px; }
  svg .bar-label { font-size: 13px; }
  #graph2 .map-label { font-size: 22px; stroke-width: 5px; }

  #outro, #outro2 { margin: 3rem 0 2rem; padding: 0 1.2rem; width: auto; font-size: 1.15em; }
}

/* Texte réservé aux lecteurs d'écran */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Focus clavier visible */
a:focus-visible, summary:focus-visible, #pcs circle:focus-visible { outline: 3px solid #4e79a7; outline-offset: 2px; }
/* Pas d'animation superflue */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

.eyebrow { font-family: Helvetica, Arial, sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #777; margin: 0.9rem 0 0 !important; text-align: left !important; }
.opener, .ctx { display: none; }

@media (max-width: 800px) {
  .duo { display: none; }
  figure#fig1 { overflow: hidden; }
  .ctx { display: block; position: absolute; left: 0; right: 0; top: 0; height: 56%; pointer-events: none; z-index: 0; }
  .ctx .photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.9s;
    -webkit-mask-image: linear-gradient(#000 0%, rgba(0,0,0,.9) 18%, rgba(0,0,0,.68) 36%, rgba(0,0,0,.42) 54%, rgba(0,0,0,.18) 74%, rgba(0,0,0,.05) 90%, transparent 100%); mask-image: linear-gradient(#000 0%, rgba(0,0,0,.9) 18%, rgba(0,0,0,.68) 36%, rgba(0,0,0,.42) 54%, rgba(0,0,0,.18) 74%, rgba(0,0,0,.05) 90%, transparent 100%); }
  .ctx .sat { position: absolute; right: 0.7rem; top: 1.6rem; width: 34%; border: 3px solid #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.3); opacity: 0; transition: opacity 0.9s 0.3s; }
  .ctx .credit { position: absolute; left: 0.7rem; top: 0.5rem; font: 0.58rem Helvetica, Arial, sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); opacity: 0; transition: opacity .9s; }
  .ctx .sat.jeannine { right: auto; left: 0.7rem; }
  .ctx .credit.jeannine { left: auto; right: 0.7rem; text-align: right; }
  figure[data-ctx="jeannine"] .jeannine, figure[data-ctx="rosa"] .rosa, figure[data-ctx="exupery"] .exupery { opacity: 1; }
  figure svg { position: relative; z-index: 1; }
}

/* Ordinateur : photo en fond de figure pour les trois collèges */
@media (min-width: 801px) {
  figure#fig1 { overflow: hidden; }
  .ctx { display: block; position: absolute; left: 0; right: 0; top: 0; height: 72%; pointer-events: none; z-index: 0; }
  .ctx .photo { position: absolute; inset: 0; background-size: cover; background-position: center 30%; opacity: 0; transition: opacity 0.9s;
    -webkit-mask-image: linear-gradient(#000 0%, rgba(0,0,0,.9) 18%, rgba(0,0,0,.68) 36%, rgba(0,0,0,.42) 54%, rgba(0,0,0,.18) 74%, rgba(0,0,0,.05) 90%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(#000 0%, rgba(0,0,0,.9) 18%, rgba(0,0,0,.68) 36%, rgba(0,0,0,.42) 54%, rgba(0,0,0,.18) 74%, rgba(0,0,0,.05) 90%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
  .ctx .sat { position: absolute; left: 0.8rem; top: 1.8rem; width: 22%; border: 3px solid #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.3); opacity: 0; transition: opacity 0.9s 0.3s; }
  .ctx .credit { position: absolute; right: 0.8rem; top: 0.5rem; text-align: right; font: 0.62rem Helvetica, Arial, sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); opacity: 0; transition: opacity .9s; }
  figure#fig1[data-ctx="jeannine"] .ctx .jeannine, figure#fig1[data-ctx="rosa"] .ctx .rosa, figure#fig1[data-ctx="exupery"] .ctx .exupery { opacity: 1; }
  figure#fig1 svg { position: relative; z-index: 1; }
  .step .eyebrow { text-align: center !important; }
  .step[data-ctx] .duo { display: none; }
}

/* ------------------------------------------------------------------
   Outil final : explorer un territoire (grille : texte à gauche, graphique à droite)
   ------------------------------------------------------------------ */
#outil { font-family: Helvetica, Arial, sans-serif; margin: 5rem auto 3rem; padding: 0 2rem; max-width: 1400px; scroll-margin-top: 1rem; }
#outil .o-head, #outil .o-terr, #outil .o-fiche, #outil .o-details { min-width: 0; }
#outil h3 { font-size: 1.8rem; margin: 0 0 .6rem; padding: 0; text-align: left; }
#outil .o-head p { font-family: "EB Garamond", serif; font-weight: 500; font-size: 1.2rem; text-align: left; margin: 0 0 1rem; padding: 0; line-height: 1.35; }
#outil .combo { position: relative; margin: 1rem 0; }
#outil label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #666; margin-bottom: .3rem; }
#outil-q { width: 100%; box-sizing: border-box; font-size: 1.05rem; padding: .65rem .8rem; border: 2px solid #bbb; border-radius: 8px; }
#outil-q:focus { border-color: #4e79a7; outline: none; }
#outil-list { display: none; position: absolute; z-index: 20; left: 0; right: 0; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid #bbb; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); max-height: 18rem; overflow-y: auto; }
#outil-list li { padding: .5rem .8rem; cursor: pointer; font-size: .95rem; margin: 0; }
#outil-list li span { color: #888; font-size: .8rem; margin-left: .4rem; }
#outil-list li.on, #outil-list li:hover { background: #eef3f8; }
#outil .o-chart { margin: 0; }
#outil-graph { width: 100%; display: block; }
.o-legende { font-size: .8rem; color: #444; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .3rem; min-height: 1.2rem; }
.o-legende i { display: inline-block; width: 18px; height: 3px; margin-right: .35rem; vertical-align: middle; }
.o-terr, .o-fiche { border: 1px solid #ddd; border-radius: 8px; padding: .8rem 1rem; background: #fafafa; margin-top: 1rem; }
.o-terr p, .o-fiche p { margin: 0; padding: 0; text-align: left; font-size: .85rem; }
.o-kicker { font-size: .68rem !important; text-transform: uppercase; letter-spacing: .08em; color: #777; }
.o-nom { font-size: 1.15rem !important; font-weight: 700; margin-bottom: .5rem !important; }
.o-terr dl, .o-fiche dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 .4rem; }
.o-terr dt, .o-fiche dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #777; }
.o-terr dd, .o-fiche dd { margin: 0; font-size: 1.1rem; font-weight: 700; }
#outil-bar { width: 100%; display: block; }
#outil-bar text { font-family: Helvetica, Arial, sans-serif; }
#outil-bar .bar-value { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
#outil-bar .bar-label { font-size: 12px; font-weight: 600; }
.o-fiche { min-height: 7.2rem; }
.o-fiche .vide { color: #888; }
.o-fiche .f-nom { font-size: 1rem !important; } .o-fiche .f-nom i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: .5rem; }
.o-fiche .f-sub { color: #666; margin-bottom: .5rem !important; }
.o-details { font-size: .85rem; margin-top: 1rem; }
.o-details table { border-collapse: collapse; width: 100%; margin-top: .5rem; }
.o-details th, .o-details td { text-align: left; padding: .25rem .4rem; border-bottom: 1px solid #eee; }
.o-scroll { max-height: 16rem; overflow: auto; }
.o-details tr.on td { background: #eef3f8; font-weight: 700; }
.o-details thead th { position: sticky; top: 0; background: #fff; }

@media (min-width: 801px) {
  #outil.o-grid { display: grid; grid-template-columns: minmax(0, 34rem) minmax(0, 1fr); grid-template-areas: "head chart" "terr chart" "fiche chart" "table chart"; column-gap: 3rem; align-items: start; }
  .o-head { grid-area: head; } .o-terr { grid-area: terr; } .o-fiche { grid-area: fiche; } .o-details { grid-area: table; }
  .o-chart { grid-area: chart; position: sticky; top: 1.5rem; }
}
@media (max-width: 800px) {
  #outil { margin: 2rem auto; padding: 0 1.2rem; }
  #outil .o-chart { position: static; height: auto; width: auto; padding: 0; order: 0; background: none; }
  #outil .o-chart svg { height: auto; }
  .o-terr dl, .o-fiche dl { grid-template-columns: repeat(2, 1fr); }
  .o-details table { font-size: .75rem; min-width: 30rem; }
  .o-fiche { min-height: 9rem; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 800px) { #outil-bar .bar-label { font-size: 15px; } #outil-bar .bar-value { font-size: 16px; } }
