/* ══════════════════════════════════════════════════
   NajahPro — feuille de style partagée du site
   Design propre et éducatif, mobile-first.
   ══════════════════════════════════════════════════ */

:root {
  --vert: #1b7a43;
  --vert-fonce: #145c32;
  --vert-clair: #eafaf0;
  --bleu: #1565c0;
  --bleu-clair: #e8f1fb;
  --violet: #6a1b9a;
  --violet-clair: #f5eafb;
  --orange: #e65100;
  --orange-clair: #fdf0e4;
  --rose: #ad1457;
  --rose-clair: #fbe9f1;
  --gris: #455a64;
  --gris-clair: #eceff1;
  --fond: #f7f9f7;
  --texte: #263238;
  --bordure: #dfe5df;
  --rayon: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

/* ─── En-tête / navigation ─── */
header.site {
  background: var(--vert);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.barre {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: .3px;
}
.logo small {
  display: block;
  font-size: .68rem;
  font-weight: 400;
  opacity: .85;
  letter-spacing: 0;
}
nav.principale { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
nav.principale a {
  color: #fff;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .95rem;
}
nav.principale a:hover, nav.principale a.actif { background: rgba(255,255,255,.18); color: #fff; }

/* ─── Contenu ─── */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
h1 { font-size: 1.9rem; line-height: 1.25; margin: .2em 0 .4em; color: var(--vert-fonce); }
h2 { font-size: 1.4rem; margin: 1.4em 0 .5em; color: var(--vert-fonce); }
h3 { font-size: 1.12rem; margin: 1.1em 0 .4em; }
p.lead { font-size: 1.12rem; color: var(--gris); }
.ar { direction: rtl; unicode-bidi: embed; font-family: "Segoe UI", Tahoma, Arial, sans-serif; }

/* ─── Bandeau d'accueil ─── */
.hero {
  background: linear-gradient(135deg, var(--vert) 0%, var(--vert-fonce) 100%);
  color: #fff;
  border-radius: var(--rayon);
  padding: 34px 26px;
  text-align: center;
  margin-bottom: 26px;
}
.hero h1 { color: #fff; margin-top: 0; }
.hero p { max-width: 640px; margin: 0 auto; opacity: .95; }

/* ─── Cartes ─── */
.grille { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }
@media (min-width: 640px) { .grille { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grille.trois { grid-template-columns: 1fr 1fr 1fr; } }
.carte {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 20px;
  text-decoration: none;
  color: var(--texte);
  display: block;
  transition: box-shadow .15s, transform .15s;
}
a.carte:hover { box-shadow: 0 6px 18px rgba(20,92,50,.13); transform: translateY(-2px); color: var(--texte); }
.carte h2, .carte h3 { margin-top: 0; }
.carte .badge {
  display: inline-block;
  background: var(--vert-clair);
  color: var(--vert-fonce);
  border-radius: 20px;
  padding: 2px 12px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.carte .badge.bientot { background: var(--gris-clair); color: var(--gris); }
.carte p { margin: .3em 0; color: var(--gris); font-size: .97rem; }
.carte .aller { color: var(--vert); font-weight: 700; font-size: .95rem; }

.grande-porte { text-align: center; padding: 30px 22px; }
.grande-porte h2 { font-size: 1.55rem; margin-bottom: .2em; }
.grande-porte .ar { font-size: 1.05rem; color: var(--gris); }

/* ─── Boutons ─── */
.bouton {
  display: inline-block;
  background: var(--vert);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 9px;
  margin: 6px 4px;
}
.bouton:hover { background: var(--vert-fonce); }
.bouton.secondaire { background: #fff; color: var(--vert) !important; border: 2px solid var(--vert); }
.bouton.secondaire:hover { background: var(--vert-clair); }

/* ─── Listes de matières / liens ─── */
ul.propre { list-style: none; padding: 0; margin: 12px 0; }
ul.propre li {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
ul.propre li .nom { font-weight: 700; }
ul.propre li .detail { color: var(--gris); font-size: .92rem; flex: 1 1 200px; }
ul.propre li a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.etiquette {
  font-size: .75rem; font-weight: 700; border-radius: 12px; padding: 1px 9px;
  background: var(--vert-clair); color: var(--vert-fonce);
}
.etiquette.grise { background: var(--gris-clair); color: var(--gris); }

/* ─── Encadrés de fiches de cours (format NajahPro : titres colorés) ─── */
.fiche { background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 8px 22px 18px; }
.encadre { border-radius: 10px; padding: 14px 18px 6px; margin: 16px 0; border-left: 6px solid; }
.encadre h3 { margin: 0 0 6px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .4px; }
.encadre p, .encadre li { margin-top: .35em; }
.encadre.def   { background: var(--bleu-clair);   border-color: var(--bleu); }
.encadre.def h3 { color: var(--bleu); }
.encadre.prop  { background: var(--violet-clair); border-color: var(--violet); }
.encadre.prop h3 { color: var(--violet); }
.encadre.meth  { background: var(--vert-clair);   border-color: var(--vert); }
.encadre.meth h3 { color: var(--vert-fonce); }
.encadre.ex    { background: var(--orange-clair); border-color: var(--orange); }
.encadre.ex h3 { color: var(--orange); }
.encadre.rem   { background: var(--rose-clair);   border-color: var(--rose); }
.encadre.rem h3 { color: var(--rose); }
.formule {
  background: #fff; border: 1px dashed rgba(0,0,0,.25); border-radius: 8px;
  padding: 8px 14px; margin: 8px 0; text-align: center;
  font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem;
}
.correction { background: rgba(255,255,255,.65); border-radius: 8px; padding: 6px 14px; margin: 8px 0; }

/* ─── Divers ─── */
.note {
  background: var(--vert-clair);
  border: 1px solid var(--vert);
  border-radius: var(--rayon);
  padding: 14px 18px;
  margin: 18px 0;
}
.fil-ariane { font-size: .9rem; color: var(--gris); margin-bottom: 6px; }
.fil-ariane a { text-decoration: none; }
table.simple { border-collapse: collapse; width: 100%; margin: 12px 0; background: #fff; }
table.simple th, table.simple td { border: 1px solid var(--bordure); padding: 9px 12px; text-align: left; vertical-align: top; }
table.simple th { background: var(--vert-clair); color: var(--vert-fonce); }

/* ─── Pied de page ─── */
footer.site {
  background: #20302a;
  color: #cfd8d3;
  margin-top: 20px;
}
footer.site .barre { align-items: flex-start; padding-top: 26px; padding-bottom: 26px; }
footer.site a { color: #a5d6b5; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .col { flex: 1 1 200px; }
footer.site h4 { color: #fff; margin: 0 0 8px; font-size: 1rem; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 5px 0; }
footer.site .bas { text-align: center; font-size: .88rem; opacity: .8; padding: 0 16px 20px; }
