/* FIDJU — site public fidju.sn
   Feuille de style commune à la page de présentation et à la politique de confidentialité.
   Jetons repris de la charte des applications (docs/design/charte.md).
   Aucune ressource tierce : la police Outfit est servie depuis ce site (fonts/, licence OFL). */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/outfit-latin-wght.woff2') format('woff2-variations'),
       url('fonts/outfit-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Couleurs de la marque */
  --jaune: #F6C21C;
  --noir: #141414;
  --vert: #1B7A2E;
  --rouge: #B42318;
  --carte: #EEF0E6;

  /* Couleurs d'appui de la charte */
  --blanc: #FFFFFF;
  --gris-50: #F4F5F0;
  --gris-200: #E2E4DB;
  --gris-600: #5A5D55;
  --gris-800: #2E302B;
  --noir-2: #262626;
  --texte-sur-noir: #D9DBD3;
  --gris-sur-noir: #B9BCB3;
  --jaune-clair: #FEF3CD;
  --brun-sur-jaune-clair: #6E5200;
  --vert-clair: #E6F2E8;

  --police: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --marge: 1rem;
  --largeur: 68rem;
  --rayon: 18px;
  --rayon-carte: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--police);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--noir);
  outline-offset: 3px;
  border-radius: 6px;
}

.sur-noir :focus-visible,
.entete :focus-visible,
.pied :focus-visible {
  outline-color: var(--jaune);
}

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--marge);
}

.icone {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Lien d'évitement */

.evitement {
  position: absolute;
  left: var(--marge);
  top: -10rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  background: var(--jaune);
  color: var(--noir);
  font-weight: 700;
  border-radius: 12px;
}

.evitement:focus {
  top: 0.5rem;
}

/* Logotype texte, en attendant le logo FIDJU */

.logotype {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  color: var(--jaune);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
}

.logotype-marque {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--jaune);
  color: var(--noir);
  font-size: 1.375rem;
  letter-spacing: 0;
}

/* En-tête */

.entete {
  background: var(--noir);
  color: var(--blanc);
}

.entete .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.entete-nav {
  display: flex;
  gap: 0.25rem;
}

.entete-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.75rem;
  color: var(--blanc);
  font-weight: 600;
  font-size: 1rem;
}

.entete-nav a[aria-current='page'] {
  color: var(--jaune);
}

/* Accueil : bandeau d'ouverture */

.ouverture {
  background: var(--jaune);
  padding: 2.5rem 0 3rem;
}

.ouverture .conteneur {
  display: grid;
  gap: 2rem;
}

.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--noir);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.etiquette .icone {
  width: 1.125rem;
  height: 1.125rem;
}

.ouverture h1 {
  font-size: clamp(2.25rem, 9vw, 3.75rem);
  max-width: 16ch;
}

.ouverture .chapeau {
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 1.1875rem;
  font-weight: 500;
}

.disponibilite {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  background: var(--noir);
  color: var(--blanc);
  border-radius: var(--rayon);
  font-weight: 600;
}

.disponibilite .icone {
  color: var(--jaune);
}

.tarif {
  align-self: start;
  padding: 1.5rem;
  background: var(--noir);
  color: var(--blanc);
  border-radius: var(--rayon-carte);
}

.tarif-tete {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--texte-sur-noir);
  font-weight: 600;
}

.tarif-pastille {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--jaune);
  color: var(--noir);
}

.tarif-montant {
  margin-top: 1.25rem;
  color: var(--jaune);
  font-size: clamp(3rem, 15vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tarif-unite {
  font-size: 0.45em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tarif-par {
  margin-top: 0.35rem;
  font-size: 1.1875rem;
  font-weight: 700;
}

.tarif-liste {
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--noir-2);
  list-style: none;
  display: grid;
  gap: 0.6rem;
  color: var(--texte-sur-noir);
}

.tarif-liste li {
  display: flex;
  gap: 0.6rem;
}

.tarif-liste .icone {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--jaune);
}

/* Sections */

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--gris-200);
}

.section-titre {
  font-size: clamp(1.75rem, 6vw, 2.375rem);
  max-width: 22ch;
}

.section-intro {
  margin-top: 0.75rem;
  max-width: 52ch;
  color: var(--gris-600);
  font-size: 1.125rem;
}

/* Étapes */

.etapes {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  counter-reset: etape;
}

.etape {
  counter-increment: etape;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.35rem;
  padding: 1.25rem;
  background: var(--gris-50);
  border-radius: var(--rayon);
}

.etape::before {
  content: counter(etape);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--noir);
  color: var(--jaune);
  font-weight: 800;
  font-size: 1.25rem;
}

.etape h3 {
  align-self: center;
  font-size: 1.25rem;
}

.etape p {
  color: var(--gris-800);
}

/* Points forts */

.atouts {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.atout {
  padding: 1.5rem;
  border: 2px solid var(--gris-200);
  border-radius: var(--rayon);
}

.atout-icone {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--jaune);
  color: var(--noir);
}

.atout h3 {
  font-size: 1.25rem;
}

.atout p {
  margin-top: 0.5rem;
  color: var(--gris-800);
}

/* Exploitant et contact */

.contact {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.bloc {
  padding: 1.5rem;
  background: var(--gris-50);
  border-radius: var(--rayon-carte);
}

.bloc h3 {
  font-size: 1.125rem;
  color: var(--gris-600);
  font-weight: 700;
}

.bloc-principal {
  margin-top: 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

.bloc address {
  margin-top: 0.35rem;
  font-style: normal;
  color: var(--gris-800);
}

.bloc p + p {
  margin-top: 0.75rem;
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  margin-top: 1rem;
  padding: 0 1.25rem;
  border-radius: var(--rayon);
  background: var(--jaune);
  color: var(--noir);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  max-width: 100%;
}

.bouton:hover {
  background: #E8B40F;
}

/* Pied de page */

.pied {
  background: var(--noir);
  color: var(--texte-sur-noir);
  padding: 2.5rem 0;
  font-size: 1rem;
}

.pied .conteneur {
  display: grid;
  gap: 1.25rem;
}

.pied .logotype {
  font-size: 1.375rem;
}

.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pied-liens a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--blanc);
  font-weight: 600;
}

.pied-mention {
  color: var(--gris-sur-noir);
}

/* Politique de confidentialité */

.page-titre {
  background: var(--jaune);
  padding: 2.25rem 0 2.5rem;
}

.page-titre h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  max-width: 20ch;
}

.page-titre p {
  margin-top: 0.75rem;
  max-width: 52ch;
  font-size: 1.125rem;
  font-weight: 500;
}

.page-titre .maj {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.politique {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.sommaire {
  align-self: start;
  padding: 1.25rem 1.25rem 0.75rem;
  background: var(--gris-50);
  border-radius: var(--rayon);
}

.sommaire h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gris-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sommaire ol {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.sommaire a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0;
  font-weight: 600;
  text-decoration: none;
}

.sommaire a:hover {
  text-decoration: underline;
}

.texte {
  max-width: 44rem;
  min-width: 0; /* élément de grille : laisse les tableaux défiler dans leur cadre */
}

.texte section {
  scroll-margin-top: 1rem;
}

.texte section + section {
  margin-top: 2.5rem;
}

.texte h2 {
  font-size: clamp(1.5rem, 5vw, 1.875rem);
}

.texte h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

.texte p,
.texte ul,
.texte ol,
.texte table {
  margin-top: 0.85rem;
}

.texte ul,
.texte ol {
  padding-left: 1.25rem;
}

.texte li + li {
  margin-top: 0.35rem;
}

.texte table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.texte th,
.texte td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--gris-200);
  text-align: left;
  vertical-align: top;
}

.texte th {
  font-weight: 700;
}

/* Tableaux de la politique : défilement horizontal sur petit écran plutôt qu'un débordement de page */

.tableau {
  margin-top: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.texte .tableau table {
  margin-top: 0;
}

/* Tableaux de trois ou quatre colonnes : largeur minimale, défilement sous cette largeur */
.texte .tableau-large table {
  min-width: 40rem;
}

/* Passages entre crochets à trancher par le product owner titulaire.
   Aucun ne doit rester dans la version mise en ligne (revue conformité, R9). */

mark.a-trancher {
  padding: 0 0.2em;
  border-bottom: 2px dashed var(--brun-sur-jaune-clair);
  border-radius: 4px;
  background: var(--jaune-clair);
  color: var(--brun-sur-jaune-clair);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.avertissement-brouillon {
  background: var(--brun-sur-jaune-clair);
  color: var(--blanc);
  font-weight: 700;
  text-align: center;
  padding: 0.75rem var(--marge);
}

/* À partir de la tablette et du poste de travail */

@media (min-width: 48rem) {
  :root {
    --marge: 2rem;
  }

  .ouverture {
    padding: 4rem 0 4.5rem;
  }

  .etapes {
    grid-template-columns: repeat(3, 1fr);
  }

  .etape {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 1.5rem;
  }

  .etape::before {
    grid-row: auto;
    margin-bottom: 0.5rem;
  }

  .etape h3 {
    align-self: start;
  }

  .atouts {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 4.5rem 0;
  }

  .pied .conteneur {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .pied-liens {
    justify-content: flex-end;
  }

  .pied-mention {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .ouverture .conteneur {
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    gap: 3rem;
  }

  .atouts {
    grid-template-columns: repeat(4, 1fr);
  }

  .politique {
    grid-template-columns: 17rem 1fr;
    gap: 3rem;
  }

  .sommaire {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

@media print {
  .entete,
  .pied,
  .sommaire,
  .evitement {
    display: none;
  }

  .page-titre,
  .ouverture {
    background: none;
  }
}
