/*
Theme Name: Cent mille étudiants
Description: Site d'archive du programme « 100 mille étudiants contre la Covid-19 » (Sénégal, 2020).
Author: LASPAD
Version: 1.0.1
Requires at least: 6.0
Text Domain: centmille
*/

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("assets/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("assets/fonts/poppins-800.woff2") format("woff2"); }

:root {
  --vert: #129a48;
  --jaune: #f5e53a;
  --rouge: #c9202f;
  --encre: #2f2f2e;
  --gris: #5b5f5d;
  --marine: #0b3f66;
  --sarcelle: #1b8f96;
  --fond: #f4f8f5;
  --filet: #dbe5de;
  --large: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--marine); text-underline-offset: 3px; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 3px solid var(--sarcelle); outline-offset: 3px; }

.cm-in { max-width: var(--large); margin: 0 auto; padding: 0 24px; }
.cm-evitement { position: absolute; left: -9999px; }
.cm-evitement:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 20; }

/* Bandeau tricolore */
.cm-tricolore { height: 6px; background: linear-gradient(90deg, var(--vert) 0 33.33%, var(--jaune) 33.33% 66.66%, var(--rouge) 66.66% 100%); }

/* En-tête */
.cm-tete { border-bottom: 1px solid var(--filet); background: #fff; position: sticky; top: 0; z-index: 10; }
.cm-tete .cm-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.cm-marque { text-decoration: none; color: var(--encre); font-weight: 800; letter-spacing: -.01em; line-height: 1; font-size: 19px; white-space: nowrap; }
.cm-marque .c1 { color: var(--vert); }
.cm-marque .c2 { color: #d9c400; }
.cm-marque .c3 { color: var(--rouge); }
.cm-marque small { display: block; font-weight: 400; font-size: 12px; letter-spacing: .04em; margin-top: 4px; color: var(--gris); }
.cm-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.cm-nav a { text-decoration: none; color: var(--encre); font-size: 15px; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.cm-nav a:hover { border-bottom-color: var(--rouge); color: var(--encre); }

/* Mention d'archive */
.cm-archive { background: var(--fond); border-bottom: 1px solid var(--filet); font-size: 14.5px; color: var(--gris); }
.cm-archive .cm-in { padding-top: 10px; padding-bottom: 10px; }

/* Ouverture */
.cm-ouverture { padding: 56px 0 64px; }
.cm-ouverture .cm-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.cm-titre { font-size: clamp(38px, 6vw, 68px); line-height: .98; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; text-transform: uppercase; }
.cm-titre .c1 { color: var(--vert); }
.cm-titre .c2 { color: var(--jaune); -webkit-text-stroke: 1px #d9c400; }
.cm-titre .c3 { color: var(--rouge); }
.cm-titre .fin { display: block; font-weight: 400; }
.cm-titre .covid { display: inline-block; background: var(--rouge); color: #fff; font-weight: 800; padding: 0 .18em; margin-left: .12em; }
.cm-chapo { font-size: 19px; max-width: 34em; margin: 0 0 14px; }
.cm-ouverture figure { margin: 0; }
.cm-ouverture figure img { border-radius: 6px; box-shadow: 0 18px 40px rgba(11, 63, 102, .18); }
.cm-ouverture figcaption { font-size: 13.5px; color: var(--gris); margin-top: 10px; }

/* Sections */
.cm-section { padding: 64px 0; }
.cm-section--fond { background: var(--fond); }
.cm-section--marine { background: linear-gradient(160deg, var(--sarcelle), var(--marine) 70%); color: #fff; }
.cm-section--marine a { color: #fff; }
.cm-h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; margin: 0 0 28px; max-width: 22em; }
.cm-h2::before { content: ""; display: block; width: 54px; height: 5px; margin-bottom: 18px; background: linear-gradient(90deg, var(--vert) 0 33.33%, var(--jaune) 33.33% 66.66%, var(--rouge) 66.66% 100%); }
.cm-texte { max-width: 44em; }
.cm-texte p { margin: 0 0 1em; }

/* Missions */
.cm-missions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; counter-reset: m; }
.cm-missions li { counter-increment: m; border-top: 1px solid rgba(255, 255, 255, .35); padding: 22px 0 26px 62px; position: relative; }
.cm-missions li::before { content: counter(m); position: absolute; left: 0; top: 14px; font-size: 44px; font-weight: 800; line-height: 1; color: var(--jaune); }
.cm-missions h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.cm-missions p { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .92); }

/* Charte */
.cm-charte { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; border: 1px solid var(--filet); border-left: 6px solid var(--vert); padding: 26px 30px; background: #fff; }
.cm-charte h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.cm-charte p { margin: 0; color: var(--gris); font-size: 15.5px; }
.cm-bouton { display: inline-block; background: var(--rouge); color: #fff; text-decoration: none; font-weight: 600; padding: 13px 22px; border-radius: 4px; white-space: nowrap; }
.cm-bouton:hover { background: #a51825; color: #fff; }

/* Universités */
.cm-univ { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px; align-items: center; }
.cm-univ li { text-align: center; font-size: 12.5px; color: var(--gris); line-height: 1.3; }
.cm-univ img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 8px; }

/* Vidéos */
.cm-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; margin: 0 0 44px; padding: 0; list-style: none; }
.cm-video button { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }
.cm-video button img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s, transform .3s; }
.cm-video button:hover img { opacity: 1; transform: scale(1.03); }
.cm-video button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 62px; height: 44px; margin: -22px 0 0 -31px; border-radius: 10px; background: var(--rouge) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7l9 5-9 5z'/%3E%3C/svg%3E") center / 26px no-repeat; }
.cm-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }
.cm-video h4 { margin: 12px 0 2px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.cm-video p { margin: 0; font-size: 13.5px; color: var(--gris); }
.cm-video p a { color: var(--gris); }
.cm-h3 { font-size: 20px; font-weight: 600; margin: 0 0 20px; }

/* Pied */
.cm-pied { background: var(--encre); color: #d9dcda; font-size: 14.5px; padding: 34px 0; }
.cm-pied .cm-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cm-pied a { color: #fff; }
.cm-pied p { margin: 0 0 4px; max-width: 40em; }

/* Pages ordinaires */
.cm-page { padding: 56px 0 72px; }
.cm-page h1 { font-size: 36px; font-weight: 800; line-height: 1.15; margin: 0 0 24px; }

@media (max-width: 900px) {
  .cm-ouverture .cm-in { grid-template-columns: 1fr; gap: 36px; }
  .cm-missions { grid-template-columns: 1fr; }
  .cm-univ { grid-template-columns: repeat(4, 1fr); }
  .cm-videos { grid-template-columns: repeat(2, 1fr); }
  .cm-charte { grid-template-columns: 1fr; }
  .cm-nav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cm-section { padding: 46px 0; }
  .cm-videos { grid-template-columns: 1fr; }
  .cm-univ { grid-template-columns: repeat(2, 1fr); }
  .cm-missions li { padding-left: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cm-video button img { transition: none; }
}

section[id] { scroll-margin-top: 84px; }
