/*
  Kit de communication SmartSchoolCongo — plaquettes A4 imprimables (Ctrl P → PDF).
  Identité des applications : noir de l'interface, page de cahier Seyès, encre rouge du
  correcteur pour quelques annotations manuscrites (Kalam). Chaque .page fait exactement une
  feuille A4 ; à l'écran, les feuilles sont posées sur un fond gris.
*/
:root {
  --papier: #eceef2;
  --feuille: #ffffff;
  --encre: #101828;
  --encre-douce: #344054;
  --ardoise: #5d6470;
  --trait: #e4e7ec;
  --seyes: #d6d1f3;
  --marge: #f2a8a8;
  --correcteur: #d23f3f;
  --correcteur-pale: #fdecec;
  --vert: #1e8a5a;
  --vert-pale: #e7f5ee;
  --bleu: #2a78d6;
  --orange: #eb6834;

  --titre: 'Familjen Grotesk', 'Segoe UI', system-ui, sans-serif;
  --texte: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --main: 'Kalam', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: var(--papier); color: var(--encre); font-family: var(--texte); font-size: 10.2pt; line-height: 1.5; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--titre); margin: 0; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
a { color: inherit; }

/* --- Barre d'outils (écran seulement) --- */
.outils { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 16px; background: rgba(16, 24, 40, .96); color: #fff; font-size: 13px; }
.outils a, .outils button { font: inherit; color: #fff; text-decoration: none; background: transparent; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.outils .principal { background: #fff; color: var(--encre); border-color: #fff; font-weight: 600; }
.outils .aide { color: rgba(255, 255, 255, .65); }

/* --- Feuille A4 --- */
@page { size: A4; margin: 0; }
.page { position: relative; width: 210mm; height: 297mm; margin: 24px auto; background: var(--feuille); overflow: hidden; box-shadow: 0 2px 18px rgba(16, 24, 40, .16); padding: 15mm 15mm 22mm; display: flex; flex-direction: column; gap: 6mm; }
@media print {
  body { background: #fff; }
  .outils, .ecran-seulement { display: none !important; }
  .page { margin: 0; box-shadow: none; break-after: page; }
}
@media screen and (max-width: 840px) {
  .page { width: 100%; height: auto; min-height: 0; margin: 0 0 12px; padding: 22px 16px 70px; }
}

/* Pied de page de chaque feuille */
.pied { position: absolute; left: 15mm; right: 15mm; bottom: 8mm; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 7.6pt; color: var(--ardoise); border-top: 0.6pt solid var(--trait); padding-top: 3mm; }
.pied img { height: 6.5mm; width: auto; }
.pied .contact { text-align: right; }

/* Bandeau de thème en haut de page */
.bandeau { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bandeau img { height: 9mm; width: auto; }
.theme { display: inline-flex; align-items: center; gap: 6px; font-size: 7.8pt; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ardoise); }
.theme::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--correcteur); }

/* Typographie de plaquette */
.surtitre { font-size: 8.4pt; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--correcteur); }
.titre-page { font-size: 25pt; }
.titre-section { font-size: 15pt; }
.chapo { font-size: 11.5pt; color: var(--encre-douce); max-width: 165mm; }
.petit { font-size: 8.4pt; color: var(--ardoise); }
.annotation { font-family: var(--main); color: var(--correcteur); font-size: 15pt; line-height: 1.15; transform: rotate(-3deg); display: inline-block; }
.souligne { background: linear-gradient(transparent 62%, var(--correcteur-pale) 62%); }

/* Page de cahier Seyès */
.seyes {
  background-color: #fff;
  background-image:
    linear-gradient(90deg, transparent 22mm, var(--marge) 22mm, var(--marge) calc(22mm + 1.2px), transparent calc(22mm + 1.2px)),
    linear-gradient(var(--seyes) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 209, 243, .55) 1px, transparent 1px),
    linear-gradient(rgba(214, 209, 243, .35) 1px, transparent 1px);
  background-size: 100% 100%, 8mm 8mm, 8mm 8mm, 2mm 2mm;
}

/* Couverture */
.couverture { padding: 0; gap: 0; }
.couverture .haut { padding: 15mm 15mm 8mm; display: flex; flex-direction: column; gap: 7mm; }
.couverture h1 { font-size: 34pt; }
.couverture .visuel { position: relative; flex: 1; min-height: 0; }
.couverture .visuel img { width: 100%; height: 100%; object-fit: cover; }
.couverture .visuel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 24, 40, 0) 45%, rgba(16, 24, 40, .82) 100%); }
.couverture .legende { position: absolute; left: 15mm; right: 15mm; bottom: 26mm; z-index: 1; color: #fff; }
.couverture .legende p { font-size: 12pt; max-width: 150mm; }
.couverture .pied { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .25); z-index: 1; }
.couverture .bas-sombre { background: var(--encre); }

/* Pastilles */
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille { display: inline-flex; align-items: center; gap: 6px; font-size: 8.4pt; font-weight: 500; border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 3px 10px; }
.pastille--sombre { background: var(--encre); border-color: var(--encre); color: #fff; }
.pastille--rouge { background: var(--correcteur-pale); border-color: transparent; color: var(--correcteur); }
.pastille--vert { background: var(--vert-pale); border-color: transparent; color: var(--vert); }

/* Grilles et cartes */
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.5mm; }
@media screen and (max-width: 840px) { .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; } }
.carte { border: 1px solid var(--trait); border-radius: 12px; padding: 4mm; background: #fff; }
.carte h3 { font-size: 11.5pt; margin-bottom: 1.5mm; }
.carte p, .carte li { font-size: 9pt; color: var(--encre-douce); }
.carte--sombre { background: var(--encre); color: #fff; border-color: var(--encre); }
.carte--sombre p, .carte--sombre li { color: rgba(255, 255, 255, .78); }
.carte--rouge { background: var(--correcteur-pale); border-color: transparent; }
.icone { display: inline-grid; place-items: center; width: 9mm; height: 9mm; border-radius: 10px; background: var(--encre); color: #fff; margin-bottom: 2.5mm; }
.icone svg { width: 5mm; height: 5mm; }
.carte--sombre .icone { background: #fff; color: var(--encre); }

/* Listes cochées */
.coches li { position: relative; padding-left: 6mm; margin-bottom: 1.6mm; font-size: 9.4pt; }
.coches li::before { content: ''; position: absolute; left: 0; top: .45em; width: 3.2mm; height: 1.7mm; border-left: 2px solid var(--correcteur); border-bottom: 2px solid var(--correcteur); transform: rotate(-45deg); }
.coches--blanc li::before { border-color: #fff; }

/* Fenêtre d'application autour d'une capture */
.fenetre { border-radius: 10px; overflow: hidden; border: 1px solid #d0d5dd; box-shadow: 0 10px 30px rgba(16, 24, 40, .16); background: #fff; }
.fenetre::before { content: ''; display: block; height: 5mm; background: #f2f4f7 radial-gradient(circle at 4mm 50%, #f04438 1.1mm, transparent 1.2mm), #f2f4f7; border-bottom: 1px solid #e4e7ec;
  background-image: radial-gradient(circle at 4mm 50%, #f97066 1.1mm, transparent 1.25mm), radial-gradient(circle at 7.6mm 50%, #fdb022 1.1mm, transparent 1.25mm), radial-gradient(circle at 11.2mm 50%, #32d583 1.1mm, transparent 1.25mm); }
.fenetre img { width: 100%; }
.legende-image { font-size: 7.8pt; color: var(--ardoise); margin-top: 2mm; }

/* Téléphone autour d'une capture mobile */
.telephone { border: 2.2mm solid var(--encre); border-radius: 7mm; overflow: hidden; background: var(--encre); box-shadow: 0 12px 28px rgba(16, 24, 40, .22); }
.telephone img { border-radius: 4.5mm; }

/* Chiffres clés */
.chiffre { font-family: var(--titre); font-size: 26pt; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.chiffre small { font-size: 11pt; font-weight: 600; letter-spacing: 0; }
.chiffre--rouge { color: var(--correcteur); }
.chiffre--vert { color: var(--vert); }

/* Tableaux */
table { width: 100%; border-collapse: collapse; font-size: 9.2pt; }
th { text-align: left; font-weight: 600; font-size: 8.2pt; color: var(--ardoise); background: #f8f9fb; padding: 2.2mm 3mm; border-bottom: 1px solid var(--trait); }
td { padding: 2.4mm 3mm; border-bottom: 1px solid var(--trait); }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.fort td { font-weight: 700; background: var(--vert-pale); color: var(--vert); }

/* Étapes numérotées */
.etapes { counter-reset: etape; display: grid; gap: 3mm; }
.etapes li { counter-increment: etape; position: relative; padding-left: 11mm; min-height: 8mm; }
.etapes li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 8mm; height: 8mm; border-radius: 50%; background: var(--encre); color: #fff; font-family: var(--titre); font-weight: 700; display: grid; place-items: center; font-size: 10pt; }
.etapes h4 { font-size: 10.5pt; margin-bottom: .5mm; }
.etapes p { font-size: 9pt; color: var(--encre-douce); }

/* Appel à l'action */
.appel { background: var(--encre); color: #fff; border-radius: 14px; padding: 6mm 7mm; display: flex; justify-content: space-between; align-items: center; gap: 6mm; }
.appel h3 { font-size: 15pt; margin-bottom: 1mm; }
.appel p { color: rgba(255, 255, 255, .78); font-size: 9.4pt; }
.appel .coordonnees { text-align: right; font-size: 9.6pt; line-height: 1.6; white-space: nowrap; }
.appel .coordonnees strong { font-size: 11pt; }

/* Partenaire ScanPay */
.partenaire { display: flex; align-items: center; gap: 4mm; border: 1px solid var(--trait); border-radius: 12px; padding: 3.5mm 4.5mm; background: #fff; }
.partenaire img { width: 12mm; height: 12mm; border-radius: 3mm; }
.partenaire h4 { font-size: 10.5pt; }
.partenaire p { font-size: 8.8pt; color: var(--encre-douce); }

/* Calculateur (écran) */
.calculateur { border: 2px dashed var(--correcteur); border-radius: 14px; padding: 5mm; background: #fff; }
.calculateur label { display: flex; flex-direction: column; gap: 4px; font-size: 9pt; font-weight: 500; }
.calculateur input, .calculateur select { font: inherit; font-size: 11pt; padding: 6px 10px; border: 1px solid #d0d5dd; border-radius: 8px; }
.calculateur .resultat { font-family: var(--titre); font-size: 20pt; font-weight: 700; color: var(--vert); }

.mention { font-size: 7.4pt; color: var(--ardoise); }
.flex { display: flex; gap: 5mm; }
.centre { align-items: center; }
.grandit { flex: 1; min-height: 0; }
.mt-auto { margin-top: auto; }

/* --- Logo : emblème + nom --- */
.marque { display: inline-flex; align-items: center; gap: 2.6mm; text-decoration: none; }
.marque img { height: 11mm; width: auto; }
.marque span { font-family: var(--titre); font-weight: 700; font-size: 13pt; letter-spacing: -0.02em; line-height: 1; }
.marque small { display: block; font-family: var(--texte); font-weight: 400; font-size: 7.4pt; color: var(--ardoise); letter-spacing: 0; margin-top: 1mm; }
.pied .marque img { height: 6mm; }
.pied .marque span { font-size: 8.6pt; }
.couverture .pied .marque span { color: #fff; }
.bandeau img.marque-seule { height: 11mm; }

/* Corrections */
ol { margin: 0; padding: 0; list-style: none; }
.carte .chiffre, .chiffre { font-family: var(--titre); font-size: 26pt; font-weight: 700; line-height: 1; }
.grandit { display: flex; flex-direction: column; }
.grandit > .fenetre { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.grandit > .fenetre img { flex: 1; min-height: 0; object-fit: cover; object-position: top left; }
.etapes--2 { grid-template-columns: 1fr 1fr; column-gap: 5mm; }
.serre td, .serre th { padding-top: 1.6mm; padding-bottom: 1.6mm; }
