/* UPSS Ségou, V3 : « La marge du cahier ».
   Un trait bordeaux sépare la marge (dates, notes, légende) du texte de l’université.
   Polices système uniquement ; aucune ressource distante. */

:root {
  --papier: #ffffff;
  --encre: #1d3c8f;
  --encre-fonce: #142d6e;
  --graphite: #262b35;
  --crayon: #4f5866;
  --marge: #a0204e;
  --calque: #e3f2ef;
  --turquoise: #12807a;
  --filet: #d5dde3;

  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, "TeX Gyre Pagella", "Noto Serif", "DejaVu Serif", serif;
  --sans: Optima, Candara, "Noto Sans", "DejaVu Sans", sans-serif;

  --max: 80rem;
  --pad-g: 1.875rem;
  --pad-d: 1.25rem;
  --marge-l: 0rem;
  --gap: 1.5rem;
  --cols: minmax(0, 1fr);
  --entete-h: 3.75rem;
  --espace: clamp(3.5rem, 2rem + 6vw, 7rem);

  /* Repères horizontaux, exprimés en % de la largeur de la page :
     --gauche = bord gauche du conteneur, --x-trait = trait de marge, --x-texte = début du texte. */
  --gauche: calc(var(--pad-g) + max(0rem, (100% - var(--max) - var(--pad-g) - var(--pad-d)) / 2));
  --x-trait: calc(var(--pad-g) / 2);
  --x-texte: var(--gauche);
}

@media (min-width: 48rem) {
  :root {
    --pad-g: clamp(1.5rem, 4vw, 3rem);
    --pad-d: var(--pad-g);
    --marge-l: 9rem;
    --gap: 2rem;
    --cols: var(--marge-l) minmax(0, 1fr);
    --x-trait: calc(var(--gauche) + var(--marge-l) + var(--gap) / 2);
    --x-texte: calc(var(--gauche) + var(--marge-l) + var(--gap));
  }
}

@media (min-width: 75rem) {
  :root {
    --marge-l: clamp(10rem, 14vw, 13rem);
    --gap: 3rem;
  }
}

/* Base */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--entete-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  color: var(--encre);
}

h2 {
  font-size: clamp(2rem, 1.35rem + 2.1vw, 2.875rem);
  text-wrap: balance;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: var(--encre);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
}

#contenu:focus {
  outline: none;
}

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.insecable,
.ref {
  white-space: nowrap;
}

.evitement {
  position: absolute;
  top: -5rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  background: var(--encre);
  color: var(--papier);
  font-weight: 700;
  text-decoration: none;
}

.evitement:focus {
  top: 0.75rem;
}

.contenu {
  box-sizing: content-box;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-g) var(--pad-d);
}

/* Boutons et liens d’action */

.bouton {
  display: inline-block;
  padding: 0.8125rem 1.125rem;
  border-radius: 3px;
  background: var(--encre);
  color: var(--papier);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.bouton:hover {
  background: var(--encre-fonce);
  color: var(--papier);
}

.lien-action {
  display: inline-block;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
}

@media (min-width: 48rem) {
  .actions {
    row-gap: 0.75rem;
    margin-top: 1.75rem;
  }
}

/* En-tête */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--papier);
  border-bottom: 1px solid var(--filet);
}

.entete__barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.625rem;
  min-height: var(--entete-h);
}

.marque {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-right: auto;
  padding-block: 0.5rem;
  color: var(--encre);
  text-decoration: none;
}

.marque__sigle {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.marque__ville {
  display: none;
  font-size: 0.9375rem;
  color: var(--crayon);
}

.entete__tel {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 3px;
  background: var(--encre);
  color: var(--papier);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.entete__tel:hover {
  background: var(--encre-fonce);
}

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

.nav {
  flex-basis: 100%;
}

.nav__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
}

.nav__liste a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--graphite);
  text-decoration: none;
}

.nav__liste a:hover {
  color: var(--encre);
  text-decoration: underline;
}

.nav__bouton {
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 2px solid var(--encre);
  border-radius: 3px;
  background: var(--papier);
  color: var(--encre);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.nav__bouton[aria-expanded="true"] {
  background: var(--encre);
  color: var(--papier);
}

@media (min-width: 30rem) {
  .marque__ville {
    display: inline;
  }
}

/* Menu replié (avec JavaScript) sous 64rem */
@media (max-width: 63.9375rem) {
  .js .nav {
    flex-basis: auto;
  }

  .js .nav__liste {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    padding: 0.25rem var(--pad-d) 1rem var(--pad-g);
    background: var(--papier);
    border-bottom: 1px solid var(--filet);
  }

  .js .nav[data-ouvert="true"] .nav__liste {
    display: flex;
  }

  .js .nav__liste a {
    display: block;
    padding-block: 0.75rem;
    color: var(--encre);
    font-size: 1.125rem;
  }
}

@media (min-width: 64rem) {
  .marque {
    margin-right: 1.75rem;
  }

  .entete__tel {
    margin-right: auto;
    padding-inline: 0;
    background: none;
    color: var(--encre);
    font-size: 1rem;
  }

  .entete__tel:hover {
    background: none;
    text-decoration: underline;
  }

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

  .entete__tel-num {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .nav {
    flex-basis: auto;
  }

  .nav__bouton {
    display: none;
  }

  .nav__liste {
    gap: 0 1.75rem;
    padding: 0;
  }
}

/* Le trait de marge : continu de la couverture au contact */

.couverture::before,
.feuille::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--x-trait) - 1px);
  width: 2px;
  background: var(--marge);
}

/* Couverture : la photo est collée par-dessus la marge */

.couverture {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "photo" "texte";
}

.couverture__photo {
  grid-area: photo;
  position: relative;
  z-index: 1;
}

/* 3:2 calé à droite sur téléphone : les trois visages restent entiers (cadre source x ≈ 261–1672). */
.couverture__photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 100% 50%;
  background: var(--calque);
}

/* La légende fait partie du bloc collé : fond Papier, le trait de marge sort de dessous. */
.couverture__photo figcaption {
  padding: 0.5rem var(--pad-d) 0 var(--x-texte);
  background: var(--papier);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--crayon);
}

.couverture__texte {
  grid-area: texte;
  padding: 1.125rem var(--pad-d) 0 var(--x-texte);
}

.couverture h1 {
  font-size: 1.875rem;
  line-height: 1.1;
}

.couverture__chapeau {
  max-width: 32em;
  margin-top: 0.875rem;
  font-size: 1.125rem;
  line-height: 1.5;
}

.couverture__suite {
  max-width: 34em;
  margin-top: 0.75rem;
  color: var(--crayon);
}

/* Sur téléphone, l’appel occupe toute la ligne (le bouton est un élément flex de .actions). */
@media (max-width: 29.9375rem) {
  .couverture .bouton {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (min-width: 48rem) {
  /* Plafond de hauteur en paysage : le recadrage vertical garde têtes et table. */
  .couverture__photo img {
    aspect-ratio: 16 / 9;
    max-height: min(36rem, 60vh);
  }

  /* Légende sous la photo, sur une ligne, alignée sur le bord gauche du conteneur. */
  .couverture__photo figcaption {
    padding: 0.625rem var(--pad-d) 0 var(--gauche);
  }

  .couverture__texte {
    container-type: inline-size;
    padding-top: 2.25rem;
  }

  .couverture h1 {
    font-size: clamp(2.25rem, 1.2rem + 2.4vw, 3.25rem);
  }

  .couverture__chapeau {
    margin-top: 1.25rem;
    font-size: 1.25rem;
  }

  /* « Souleymane SACKO » reste sur une ligne ; la taille suit la colonne.
     8.6cqi laisse tenir ces deux mots même en DejaVu Serif Bold (≈ 11 em). */
  @supports (width: 1cqi) {
    .couverture h1 {
      font-size: min(3.75rem, 8.6cqi);
    }

    .ensemble {
      white-space: nowrap;
    }
  }
}

@media (min-width: 68.75rem) {
  .couverture {
    grid-template-columns: minmax(0, 10fr) minmax(0, 11fr);
    grid-template-areas: "photo texte";
    align-items: center;
  }

  .couverture__photo {
    align-self: start;
  }

  /* 5:4 sur les ordinateurs étroits pour que la photo ait la hauteur du texte voisin
     (5:4 calé à droite garde les trois personnes : cadre source x ≈ 496–1672). */
  .couverture__photo img {
    aspect-ratio: 5 / 4;
    max-height: min(42rem, calc(100vh - var(--entete-h) - 4rem));
  }

  /* La figure occupe 10/21 de la page : 100 % × 2.1 redonne la largeur de la page.
     La légende part du bord gauche du conteneur et court jusqu’au bord droit de la photo. */
  .couverture__photo figcaption {
    padding-right: 1rem;
    padding-left: calc(var(--pad-g) + max(0rem, (100% * 2.1 - var(--max) - var(--pad-g) - var(--pad-d)) / 2));
  }

  /* Le texte occupe 11/21 de la page : marge droite alignée sur le conteneur. */
  .couverture__texte {
    padding: 2.5rem calc(var(--pad-d) + max(0rem, (100% * 21 / 11 - var(--max) - var(--pad-g) - var(--pad-d)) / 2)) 2rem clamp(2.5rem, 4vw, 4rem);
  }
}

@media (min-width: 85rem) {
  .couverture__photo img {
    aspect-ratio: 4 / 3;
  }
}

/* Feuilles : chaque section reprend la grille marge | texte */

.feuille {
  position: relative;
  padding-top: var(--espace);
}

/* L’histoire suit directement la couverture : un seul blanc, pas un cumul. */
.couverture + .feuille {
  padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.feuille--echange {
  padding-bottom: var(--espace);
}

/* Feuille Calque accrochée au trait : vraie couleur de fond (contrastes mesurables),
   la marge à gauche du trait est repeinte en Papier. Aucun contenu de contact n’est dans la marge. */
.feuille--contact {
  padding-bottom: var(--espace);
  background: var(--calque);
}

.feuille--contact::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--x-trait) - 1px);
  background: var(--papier);
}

.grille {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: var(--gap);
  row-gap: 2.25rem;
}

.principal {
  grid-column: -2 / -1;
  max-width: 40rem;
}

.chapeau {
  max-width: 36em;
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.55;
}

.rangee {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: var(--gap);
  row-gap: 1rem;
  align-items: start;
}

.rangee > :last-child {
  grid-column: -2 / -1;
}

/* Notes de marge : l’italique de Palatino, en bordeaux */
.note {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--marge);
}

@media (min-width: 48rem) {
  .chapeau {
    font-size: 1.3125rem;
  }

  .note {
    grid-column: 1 / 2;
    text-align: right;
  }
}

/* L’université : les actes datés, posés sur le trait */

.actes {
  grid-column: 1 / -1;
  display: grid;
  row-gap: 2.25rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.acte {
  align-items: baseline;
}

.acte__date {
  position: relative;
  font-size: 1.25rem;
}

.acte__date::after {
  content: "";
  position: absolute;
  top: 0.42em;
  left: calc(var(--pad-g) / -2 - 0.34375rem);
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  background: var(--marge);
  box-shadow: 0 0 0 4px var(--papier);
}

.acte__texte p {
  margin-top: 0.25rem;
  color: var(--crayon);
}

@media (min-width: 48rem) {
  .acte__date::after {
    right: calc(var(--gap) / -2 - 0.34375rem);
    left: auto;
  }
}

/* Domaines d’études */

.domaines {
  display: grid;
  row-gap: 0.75rem;
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.domaine {
  font-family: var(--serif);
  font-size: clamp(1.3125rem, 1rem + 1.3vw, 1.875rem);
  line-height: 1.22;
  color: var(--encre);
}

.domaine__bouton {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.375rem 0.5rem 0.375rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.case {
  flex: none;
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: calc((1.22em - 1.25rem) / 2);
  border: 2px solid var(--encre);
  border-radius: 3px;
  background: var(--papier);
  transition: background-color 0.12s ease-out, border-color 0.12s ease-out;
}

.domaine__bouton:hover .case {
  border-color: var(--marge);
}

.domaine__bouton[aria-pressed="true"] .case {
  border-color: var(--marge);
  background: var(--marge);
}

.domaine__bouton[aria-pressed="true"] .case::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--papier);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.domaines__etat {
  font-size: 1rem;
  color: var(--crayon);
}

.domaines__etat:not(:empty) {
  margin-top: 1.25rem;
}

/* Préparer l’échange */

.bande {
  position: relative;
  z-index: 1;
  margin: 2.5rem 0 2.75rem var(--x-texte);
}

.bande img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 30%;
  background: var(--calque);
}

.echange {
  display: grid;
  gap: 2rem 3.5rem;
  align-items: start;
}

.questions {
  display: grid;
  row-gap: 0.625rem;
  max-width: 34em;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.questions li {
  position: relative;
  padding-left: 1.375rem;
}

.questions li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0.125rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--turquoise);
}

.message {
  padding: 1.375rem 1.25rem 1.5rem;
  border: 2px solid var(--encre);
  border-radius: 4px;
}

.message__domaines {
  margin-top: 0.75rem;
}

.message .actions {
  margin-top: 1.25rem;
}

@media (min-width: 48rem) {
  .bande img {
    aspect-ratio: 16 / 9;
  }

  .message {
    padding: 1.625rem 1.75rem 1.75rem;
  }
}

@media (min-width: 64rem) {
  .echange {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

@media (min-width: 75rem) {
  .bande img {
    aspect-ratio: 2 / 1;
    max-height: 36rem;
    object-position: 50% 20%;
  }
}

/* Contact : une feuille turquoise pâle accrochée au trait */

.coordonnees-bloc {
  grid-column: -2 / -1;
  container-type: inline-size;
}

.coordonnees {
  display: grid;
  gap: 1.75rem 2.5rem;
}

.coordonnee--tel {
  grid-column: 1 / -1;
}

.coordonnee dt {
  font-size: 0.9375rem;
  color: var(--crayon);
}

.coordonnee dd {
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.3;
  color: var(--graphite);
}

.coordonnee--tel dd {
  font-size: clamp(1.75rem, 1.1rem + 3vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
}

/* Taille liée à la colonne pour que le numéro tienne sur une ligne (≈ 10,6 em en DejaVu Serif Bold). */
@supports (width: 1cqi) {
  .coordonnee--tel dd {
    font-size: min(3.25rem, 8.8cqi);
  }
}

@media (min-width: 48rem) {
  .coordonnees {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .coordonnees {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Pied de page */

.pied {
  padding-block: 2.5rem 3rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--crayon);
}

.pied__barre {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
}

/* Mouvement réduit */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
