/* =====================================================================
   ITSS Cameroun — couche de design « Signature 2026 »
   Chargée en dernier sur toutes les pages publiques.
   Règle d'or : ne modifie NI la disposition (grilles, ordre, colonnes)
   NI les animations existantes (transitions, keyframes, révélations).
   Elle agit sur : typographie, couleurs, surfaces, bordures, ombres,
   lisibilité (tailles minimales, contrastes) et petits défauts visuels.
   ===================================================================== */

/* ---------- 1. Jetons de design ---------- */
:root {
  --sig-navy: #0a1f3c;
  --sig-navy-2: #12305a;
  --sig-navy-deep: #06142a;
  --sig-ink: #0d1d33;
  --sig-text: #34455b;
  --sig-muted: #556377;            /* 6,1:1 sur blanc */
  --sig-orange: #f36f21;           /* orange du logo : décor, filets, points */
  --sig-orange-text: #b8480c;      /* orange lisible pour le texte (5,3:1) */
  --sig-orange-btn: #c64f0e;       /* fond des boutons (texte blanc 4,6:1) */
  --sig-orange-btn-2: #a8410b;     /* survol */
  --sig-orange-on-dark: #ff9a57;   /* orange lisible sur bleu nuit (7,5:1) */
  --sig-sand: #f5f7fb;
  --sig-paper: #fbfcfe;
  --sig-line: #e2e8f1;
  --sig-line-2: #cdd7e4;
  --sig-display: "Bricolage Grotesque", "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --sig-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --sig-radius: 16px;
  --sig-radius-sm: 10px;
  --sig-shadow-1: 0 1px 2px rgb(10 31 60 / 5%), 0 2px 6px -2px rgb(10 31 60 / 6%);
  --sig-shadow-2: 0 1px 2px rgb(10 31 60 / 5%), 0 14px 32px -18px rgb(10 31 60 / 28%);
  --sig-shadow-3: 0 2px 4px rgb(10 31 60 / 6%), 0 28px 56px -28px rgb(10 31 60 / 38%);

  /* Les feuilles existantes lisent ces variables : on les réaligne. */
  --sans: var(--sig-body);
  --serif: var(--sig-display);
  --muted: var(--sig-muted);
  --text: var(--sig-text);
  --ink: var(--sig-ink);
  --navy: var(--sig-navy);
  --accent: var(--sig-orange-btn);
  --accent-hover: var(--sig-orange-btn-2);
  --line: var(--sig-line);
  --line-2: var(--sig-line-2);
  --sand: var(--sig-sand);
  --paper: var(--sig-paper);
}

/* ---------- 2. Typographie ---------- */
html body.v2-shell,
html#v2app#v2app.v2-app body,
html body.v2-shell #main-content {
  font-family: var(--sig-body);
  color: var(--sig-text);
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html body.v2-shell :is(input, select, textarea, button) { font-family: inherit; }

html body.v2-shell :is(h1, h2, h3, h4, .h1, .h1-page, .h2, .serif) {
  font-family: var(--sig-display);
  font-optical-sizing: auto;
  text-wrap: balance;
}
html body.v2-shell :is(.h1, .h1-page) { font-weight: 700; letter-spacing: -.022em; }
html body.v2-shell .h1 { line-height: 1.02; }
html body.v2-shell .h1-page { line-height: 1.06; }
html body.v2-shell .h2 { font-weight: 700; letter-spacing: -.018em; line-height: 1.12; }
html body.v2-shell :is(.h3, h3) { font-family: var(--sig-display); font-weight: 650; letter-spacing: -.012em; }

html body.v2-shell :is(p, li) { text-wrap: pretty; }
html body.v2-shell .lead { color: var(--sig-text); line-height: 1.62; }
html body.v2-shell :is(.muted, .meta, .small.muted) { color: var(--sig-muted); }

/* Fin des paragraphes justifiés : plus de « rivières » blanches entre les mots. */
html body.v2-shell main :is(p.plain, .feature p:not(.eyebrow), .story p:not(.eyebrow), .grid-57 p:not(.eyebrow)) { text-align: start; }

/* Sur-titres (eyebrows) : petites capitales espacées, point orange. */
html body.v2-shell .eyebrow {
  color: var(--sig-orange-text);
  font-family: var(--sig-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.4;
}
html body.v2-shell .eyebrow::before {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sig-orange), #ffb27f);
}
html body.v2-shell .sec-navy .eyebrow,
html body.v2-shell .site-footer .eyebrow { color: var(--sig-orange-on-dark); }

/* Filet sous les titres de section : centré quand le bloc est centré. */
html body.v2-shell [style*="text-align:center"] .h2::after,
html body.v2-shell [style*="text-align: center"] .h2::after { margin-inline: auto; }
html body.v2-shell .h2::after { background: linear-gradient(90deg, var(--sig-orange), #ffb27f 55%, transparent); }
html body.v2-shell .sec-navy .h2::after { background: linear-gradient(90deg, var(--sig-orange-on-dark), transparent); }

/* Grands chiffres (étapes 1-2-3, 01-02-03) en police d'affichage. */
html body.v2-shell :is(.num, .steps .num) {
  font-family: var(--sig-display);
  font-weight: 600;
  color: var(--sig-orange-text);
  letter-spacing: -.03em;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Liens dans le texte et liens fléchés. */
html body.v2-shell main :is(p, li) > a:not(.btn), html body.v2-shell main :is(.link, .more) { color: var(--sig-orange-text); }
html body.v2-shell main :is(p, li) > a:not(.btn):hover, html body.v2-shell main :is(.link, .more):hover { color: var(--sig-orange-btn-2); }
html body.v2-shell .sec-navy :is(p, li) > a:not(.btn), html body.v2-shell .sec-navy :is(.link, .more) { color: var(--sig-orange-on-dark); }
html body.v2-shell .link, html body.v2-shell .more { font-weight: 650; }
html body.v2-shell main p a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(184 72 12 / 35%); }
html body.v2-shell main p a:not(.btn):hover { text-decoration-color: currentColor; }

::selection { background: #ffd9bf; color: #0a1f3c; }

/* ---------- 3. Boutons ---------- */
html body.v2-shell .btn { font-family: var(--sig-body); font-weight: 650; letter-spacing: .005em; border-radius: 10px; }
html body.v2-shell :is(.btn-primary, .header-actions .btn, .glow-cta) {
  background: linear-gradient(180deg, #d2570f 0%, var(--sig-orange-btn) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 1px 2px rgb(120 45 5 / 25%), 0 8px 18px -10px rgb(198 79 14 / 70%);
}
html body.v2-shell :is(.btn-primary, .header-actions .btn, .glow-cta):hover {
  background: linear-gradient(180deg, #bb4c0d 0%, var(--sig-orange-btn-2) 100%);
  color: #fff;
}
html body.v2-shell .btn-dark { background: linear-gradient(180deg, var(--sig-navy-2), var(--sig-navy)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%), 0 8px 18px -10px rgb(10 31 60 / 60%); }
html body.v2-shell .btn-ghost { background: #fff; color: var(--sig-navy); border-color: var(--sig-line-2); box-shadow: var(--sig-shadow-1); }
html body.v2-shell .btn-ghost:hover { border-color: var(--sig-navy); color: var(--sig-navy); background: #fff; }
html body.v2-shell .btn-ghost-light { border-color: rgb(255 255 255 / 55%); }
html body.v2-shell .mega-catalogue-cta { color: var(--sig-orange-text); border-color: rgb(198 79 14 / 45%); }
html body.v2-shell .mega-catalogue-cta:hover { color: var(--sig-orange-btn-2); border-color: var(--sig-orange-btn); }

/* Anneau de focus clavier visible et cohérent partout. */
html body.v2-shell :focus-visible { outline: 3px solid rgb(243 111 33 / 55%); outline-offset: 3px; border-radius: 8px; }

/* ---------- 4. Bandeau d'annonce et en-tête ---------- */
html body.v2-shell .announce {
  background:
    radial-gradient(600px 80px at 50% -30px, rgb(243 111 33 / 22%), transparent 70%),
    linear-gradient(90deg, var(--sig-navy-deep), var(--sig-navy) 50%, var(--sig-navy-deep));
  font-size: 13.5px;
}
html body.v2-shell .site-header {
  background: rgb(255 255 255 / 92%);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: rgb(205 215 228 / 70%);
}
html body.v2-shell .brand-name b { font-family: var(--sig-display); letter-spacing: -.01em; }
html body.v2-shell .brand-name small { color: var(--sig-muted); }
html body.v2-shell .nav > a, html body.v2-shell .nav-group > button, html body.v2-shell .nav-group > a.nav-top { color: var(--sig-ink); font-weight: 550; }
html body.v2-shell .nav > a.is-current,
html body.v2-shell .nav > a[aria-current="page"],
html body.v2-shell .nav-group.is-current > :is(button, a) { color: var(--sig-orange-text); }
html body.v2-shell .nav-panel { border-radius: 14px; box-shadow: var(--sig-shadow-3); }

/* ---------- 5. Sections et surfaces ---------- */
html body.v2-shell .sec-sand,
html body.v2-shell section[style*="background:var(--paper)"] {
  background-color: var(--sig-sand);
  background-image: radial-gradient(rgb(10 31 60 / 5.5%) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
html body.v2-shell .sec-navy {
  background-color: var(--sig-navy);
  background-image:
    radial-gradient(900px 420px at 88% -10%, rgb(243 111 33 / 16%), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgb(56 120 210 / 18%), transparent 60%),
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}
html body.v2-shell .sec-navy :is(p, li, .lead) { color: #d6e0ec; }
html body.v2-shell .page-hero { position: relative; }
html body.v2-shell .crumbs { font-size: 13px; color: var(--sig-muted); }
html body.v2-shell .crumbs a { color: var(--sig-muted); }
html body.v2-shell .crumbs a:hover { color: var(--sig-orange-text); }

/* Cartes, encadrés et vignettes : bord fin, coins doux, ombre en couches. */
html body.v2-shell :is(.card, .feature, .channel, .doc, .quick a, .app-detail-card, .application-tile, .library-fact) {
  border-color: var(--sig-line);
  border-radius: var(--sig-radius);
  box-shadow: var(--sig-shadow-2);
}
html body.v2-shell .feature { overflow: hidden; background: #fff; }
@media (min-width: 900px) {
  /* L'image de la carte « Challenge » remplit maintenant toute la hauteur (plus de vide en bas). */
  html body.v2-shell .feature > img { align-self: stretch; height: 0; min-height: 100%; max-height: none; object-fit: cover; }
}
html body.v2-shell .hero-video { border-radius: 20px; overflow: hidden; box-shadow: var(--sig-shadow-3); isolation: isolate; }
html body.v2-shell .hero-video figcaption { font-weight: 600; letter-spacing: .01em; }

/* Listes à puces « lignes » : puce orange carrée arrondie. */
html body.v2-shell .list-lines li::before { background: var(--sig-orange); border-radius: 2px; }

/* Étiquettes (tags) */
html body.v2-shell .tags > * { border-radius: 999px; border-color: var(--sig-line-2); background: #fff; font-weight: 550; }

/* Bandeau partenaires : bords fondus pour que le défilement ne coupe plus le texte net. */
html body.v2-shell .marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
html body.v2-shell .marquee .word { font-family: var(--sig-display); font-weight: 700; letter-spacing: -.01em; color: var(--sig-navy); }
html body.v2-shell .trust { color: var(--sig-muted); font-size: 13.5px; }

/* Tableaux (grille de notation du Challenge…) : lisibles. */
html body.v2-shell main table { font-size: 14px; }
html body.v2-shell main :is(th, td) { font-size: max(12.5px, 1em); }
html body.v2-shell main th { font-size: 12.5px; letter-spacing: .06em; }

/* ---------- 6. Formulaires ---------- */
html body.v2-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  border-radius: var(--sig-radius-sm);
  border-color: var(--sig-line-2);
  color: var(--sig-ink);
  font-size: max(15px, 1em);
}
html body.v2-shell :is(input, select, textarea)::placeholder { color: #7a8799; }
html body.v2-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover { border-color: #aebbd0; }
html body.v2-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--sig-orange-btn);
  box-shadow: 0 0 0 4px rgb(243 111 33 / 16%);
  outline: none;
}
html body.v2-shell label { color: var(--sig-ink); }
html body.v2-shell :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--sig-orange-btn); }

/* ---------- 7. Pied de page ---------- */
html body.v2-shell .site-footer {
  background-color: var(--sig-navy-deep);
  background-image:
    radial-gradient(800px 300px at 100% 0%, rgb(243 111 33 / 10%), transparent 60%),
    linear-gradient(180deg, var(--sig-navy), var(--sig-navy-deep));
  color: #c9d5e4;
  font-size: 14px;
  line-height: 1.5;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--sig-orange), #ffb27f 40%, transparent 80%) 1;
}
html body.v2-shell .foot h2 { font-family: var(--sig-display); font-size: 14.5px; letter-spacing: .01em; color: #fff; }
html body.v2-shell .foot a { min-height: 28px; color: #c9d5e4; }
html body.v2-shell .foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sig-orange-on-dark); }
html body.v2-shell .foot-bottom { font-size: 12.5px; color: #9fb0c5; }
html body.v2-shell .foot-bottom a { color: #c9d5e4; }

/* ---------- 8. Lisibilité : aucune taille de texte sous 12 px ---------- */
html body.v2-shell :is(.itss-mega-motto, .itss-mega-eyebrow, .community-social-kicker, .community-auth-kicker, .community-groups-kicker,
  .cine-nav-label, .library-kicker, .library-section-kicker, .app-kicker, .resource-access-kicker) { font-size: 12px !important; letter-spacing: .08em; }
html body.v2-shell :is(.community-auth-privacy, .library-access-note, .library-hero-note, .cine-nav-note, .cine-rail-note,
  .community-auth-optional, .community-auth-switch, .community-feed-count, .editorial-image-label, .cine-video-item-copy .eyebrow,
  .editorial-footnote-icon) { font-size: 12.5px !important; }
html body.v2-shell :is(.app-detail-back, .library-explore, .community-composer-action, .itss-mega-feature-link, .cine-action-button) { font-size: 13px !important; }
html body.v2-shell .app-detail-page .btn { font-size: 14px !important; }
html body.v2-shell .app-detail-page :is(li, summary) { font-size: 13px; }
html body.v2-shell .app-detail-page h3 { font-size: 15px; }
html body.v2-shell #challenge-grid-table th, html body.v2-shell .challenge-grid th { font-size: 12px; }

/* ---------- 9. Contrastes : textes gris trop pâles sur fond clair ---------- */
html body.v2-shell :is(.community-auth-privacy, .community-auth-optional, .community-auth-switch, .community-feed-count,
  .library-access-note, .reviews-empty) { color: var(--sig-muted) !important; }
html body.v2-shell .editorial-image-label { background: rgb(10 31 60 / 82%); color: #fff; }

/* ---------- 10. Barre de défilement discrète (Chrome/Edge) ---------- */
html body.v2-shell::-webkit-scrollbar { width: 12px; }
html body.v2-shell::-webkit-scrollbar-track { background: var(--sig-sand); }
html body.v2-shell::-webkit-scrollbar-thumb { background: #b9c5d5; border-radius: 10px; border: 3px solid var(--sig-sand); }
html body.v2-shell::-webkit-scrollbar-thumb:hover { background: #8fa0b6; }

/* ---------- 11. Bouton « Devenir membre » de l'en-tête (forcé en !important dans site.css) ---------- */
html body.v2-shell .header-actions .btn-primary {
  background: linear-gradient(180deg, #d2570f 0%, var(--sig-orange-btn) 100%) !important;
  border-color: transparent !important;
}
html body.v2-shell .header-actions .btn-primary:hover {
  background: linear-gradient(180deg, #bb4c0d 0%, var(--sig-orange-btn-2) 100%) !important;
}

/* ---------- 12. Bibliothèque : accent bleu remplacé par l'orange de la marque ---------- */
html body.v2-shell .library-hero h1 em { color: var(--sig-orange-on-dark); }
html body.v2-shell :is(.library-search button, .library-page .lib-card-actions .btn, .library-explore, .library-reader-download) {
  background: linear-gradient(180deg, #d2570f 0%, var(--sig-orange-btn) 100%);
  color: #fff;
}
html body.v2-shell :is(.library-search button, .library-page .lib-card-actions .btn, .library-explore, .library-reader-download):hover {
  background: linear-gradient(180deg, #bb4c0d 0%, var(--sig-orange-btn-2) 100%);
  color: #fff;
}
html body.v2-shell .library-nav a::after { background: var(--sig-orange); }
html body.v2-shell .library-section-kicker { color: var(--sig-orange-text); }
html body.v2-shell .library-page .lib-card-actions .btn { font-size: 13px; }
html body.v2-shell .library-reader-download { font-size: 12.5px; }

/* ---------- 13. Lisibilité : derniers textes sous 12 px ---------- */
html body.v2-shell .itss-mega-brand small { font-size: 12px !important; }
html body.v2-shell table.criteria th { font-size: 12px !important; letter-spacing: .06em; }
html body.v2-shell table.criteria tbody td { font-size: 13px !important; }
html body.v2-shell table.criteria tbody td:last-child { font-size: 14px !important; }
/* Communauté */
html body.v2-shell :is(.community-social-note, .community-social-about) :is(p, a),
html body.v2-shell .community-event-line p,
html body.v2-shell .community-social-join strong { font-size: 13px !important; }
html body.v2-shell :is(.community-social-profile, .community-social-join) small { font-size: 12px !important; }
html body.v2-shell .community-event-date span { font-size: 11px !important; letter-spacing: .08em; }  /* étiquette « OCT. » dans la pastille de date */
html body.v2-shell .community-auth-card label { font-size: 13px !important; }
/* ITSS Ciné */
html body.v2-shell .cine-watch-brand small,
html body.v2-shell .cine-channel-brand small span,
html body.v2-shell .cine-comments-heading a { font-size: 12px !important; }
html body.v2-shell .cine-rail-head p.eyebrow { font-size: 12px !important; }
/* Bibliothèque */
html body.v2-shell .library-hero-guide small,
html body.v2-shell :is(.library-quick-access, .library-categories, .library-fact) small,
html body.v2-shell .library-footer small,
html body.v2-shell .library-mini-heading span,
html body.v2-shell .library-fact span { font-size: 12px !important; }
html body.v2-shell :is(.library-quick-access, .library-categories) strong,
html body.v2-shell .library-footer :is(a, p, .library-footer-brand span),
html body.v2-shell .library-section-title p { font-size: 13px !important; }
/* Applications */
html body.v2-shell .application-tile small,
html body.v2-shell .application-tile > span,
html body.v2-shell .app-gallery-head span,
html body.v2-shell .app-detail-facts span,
html body.v2-shell .app-detail-versions summary span,
html body.v2-shell .app-version-row small { font-size: 12px !important; }
html body.v2-shell .app-detail-guidance-grid p { font-size: 13px !important; }

/* Mobile : les règles responsives existantes réduisaient encore ces textes. */
html body.v2-shell .facts .fx > span,
html body.v2-shell .mega-catalogue-cta > span,
html body.v2-shell .community-social-nav a,
html body.v2-shell .community-social-nav .community-nav-icon,
html body.v2-shell .community-social-heading p,
html body.v2-shell .community-social-composer > a,
html body.v2-shell .community-social-event > a,
html body.v2-shell .cine-channel-brand b,
html body.v2-shell .cine-current-description,
html body.v2-shell .library-hero-guide strong,
html body.v2-shell .app-gallery-help :is(a, span),
html body.v2-shell .application-tile > strong,
html body.v2-shell .app-detail-identity p { font-size: 12.5px !important; }
html body.v2-shell .app-detail-identity p.eyebrow { font-size: 12px !important; }
html body.v2-shell .application-tile > strong, html body.v2-shell .library-hero-guide strong { font-size: 13px !important; }

/* ---------- 14. Ajustements téléphone ---------- */
@media (max-width: 640px) {
  html body.v2-shell .site-footer { font-size: 13.5px; }
  html body.v2-shell .foot a { min-height: 32px; font-size: 13.5px; }
  html body.v2-shell .foot ul { column-gap: 16px; }
  html body.v2-shell .foot > div { min-width: 0; }
  html body.v2-shell .foot { column-gap: 24px; }
  html body.v2-shell .foot > div:not(:first-child):not(:last-child) ul { grid-template-columns: minmax(0, 1fr); }
  html body.v2-shell .community-social-nav a,
  html body.v2-shell .community-social-nav .community-nav-icon { font-size: 12px !important; }
  html body.v2-shell .eyebrow { font-size: 12px; letter-spacing: .08em; }
}

/* ---------- 15. Responsive : très petits téléphones (320-359 px) ---------- */
@media (max-width: 359px) {
  /* L'en-tête débordait de 13 px : le bouton Catalogue passe en icône seule (le texte reste lu par les lecteurs d'écran). */
  html body.v2-shell .site-header .wrap { gap: 8px; }
  html body.v2-shell .header-actions { gap: 6px; }
  html body.v2-shell .mega-catalogue-cta { flex: 0 0 40px !important; width: 40px !important; min-width: 40px !important; height: 40px; padding: 0 !important; justify-content: center; }
  html body.v2-shell .header-actions > .hide-sm { display: none !important; }
  html body.v2-shell .mega-catalogue-cta > span:not(.mega-catalogue-icon) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  html body.v2-shell .mega-catalogue-cta .mega-catalogue-arrow { display: none !important; }
  html body.v2-shell .mega-catalogue-cta .mega-catalogue-icon { display: block !important; width: 19px; height: 19px; flex: 0 0 19px; }
  html body.v2-shell .brand-name b { font-size: 15px; }
}

/* ---------- 16. Responsive : zones tactiles d'au moins 40 px sur écrans tactiles ---------- */
@media (pointer: coarse), (max-width: 1024px) {
  html body.v2-shell main :is(a[href^="tel:"], a[href^="mailto:"], a[href*="google.com/maps"]),
  html body.v2-shell .lib-download-link,
  html body.v2-shell .library-footer a,
  html body.v2-shell .community-social-event > a,
  html body.v2-shell .cine-comments-heading a,
  html body.v2-shell .community-auth-main a[href="/community"],
  html body.v2-shell button[data-pw] {
    display: inline-flex; align-items: center; min-height: 40px;
  }
  html body.v2-shell main input[type="checkbox"] { width: 22px; height: 22px; }
}
