/* =====================================================================
   CHKSM — Design 2026 (refonte)
   Chargé APRÈS style.css : redéfinit les jetons et l'habillage commun
   (structure, navigation, cartes, formulaires, tableaux, site public,
   espace élève). Les modules spécifiques (bulletins, règlement, fiches
   Coran, finance…) restent dans style.css et héritent des jetons.

   Couleurs de l'établissement : vert #0e6b45 et or #e0a82e.
   Signature : motif géométrique (étoile à 8 branches) en filets dorés.
   ===================================================================== */

/* ---------------- Polices auto-hébergées ---------------- */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/amiri-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/amiri-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------------- Jetons ---------------- */
:root {
  --vert:        #0e6b45;   /* couleur de l'école */
  --vert-fonce:  #0a5236;
  --vert-nuit:   #062e20;
  --vert-clair:  #14855a;
  --vert-50:     #e9f3ee;
  --vert-100:    #d3e8dd;
  --or:          #e0a82e;   /* couleur de l'école */
  --or-clair:    #f1c45c;
  --or-fonce:    #9a6c0b;   /* or lisible sur fond clair */
  --or-50:       #fbf3df;
  --fond:        #f2f5f3;
  --carte:       #ffffff;
  --ligne:       #dde6e1;
  --ligne-douce: #ebf0ed;
  --texte:       #13241c;
  --texte-doux:  #5b6c64;
  --rouge:       #b4382a;
  --rouge-50:    #fbecea;
  --bleu:        #25618f;
  --bleu-50:     #e8f0f7;

  --ombre:       0 1px 2px rgba(6,46,32,.06), 0 4px 14px rgba(6,46,32,.05);
  --ombre-forte: 0 12px 32px rgba(6,46,32,.14);
  --radius:      14px;
  --radius-sm:   10px;
  --sidebar-w:   264px;
  /* Les anciens dégradés deviennent des aplats (utilisés par les modules) */
  --grad-vert:   linear-gradient(var(--vert), var(--vert));
  --grad-or:     linear-gradient(var(--or), var(--or));

  --f-ui:      'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-titre:   'Fraunces', Georgia, 'Times New Roman', serif;
  --f-arabe:   'Amiri', 'Traditional Arabic', serif;

  --bs-body-font-family: var(--f-ui);
  --bs-body-color: var(--texte);
  --bs-link-color: var(--vert);
  --bs-link-color-rgb: 14,107,69;
  --bs-link-hover-color: var(--vert-fonce);
  --bs-link-hover-color-rgb: 10,82,54;
  --bs-success: #0e6b45;
  --bs-success-rgb: 14,107,69;
  --bs-border-color: var(--ligne);
  --bs-secondary-color: var(--texte-doux);
}

body { font-family: var(--f-ui); color: var(--texte); background: var(--fond);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01' on; }
::selection { background: var(--or-clair); color: var(--vert-nuit); }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: none; }
.text-success { color: var(--vert) !important; }
.bg-success { background-color: var(--vert) !important; }
.text-muted { color: var(--texte-doux) !important; }
.arabe, [lang="ar"] { font-family: var(--f-arabe); font-size: 1.2em; line-height: 1.7; }

/* Titres de page : la serif donne la voix de l'établissement */
.content > h3.fw-bold:first-child,
.content > .d-flex:first-child h3.fw-bold,
.page-titre { font-family: var(--f-titre); font-weight: 600 !important; color: var(--vert-nuit);
  letter-spacing: -.01em; font-size: 1.75rem; }
h3.fw-bold { color: var(--vert-nuit); letter-spacing: -.01em; }
.section-title { font-family: var(--f-titre); font-weight: 600 !important; color: var(--vert-nuit); padding-bottom: .6rem; }
.section-title::after { height: 3px; width: 48px; background: var(--or); border-radius: 0; }

/* Motif géométrique réutilisable */
.motif-or   { background-image: url('../img/motif-or.svg'); background-size: 80px 80px; }
.motif-blanc{ background-image: url('../img/motif-blanc.svg'); background-size: 80px 80px; }

/* =====================================================================
   STRUCTURE ADMINISTRATION
   ===================================================================== */
.content { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }

/* ---- Barre latérale ---- */
.sidebar {
  background: var(--vert-nuit); box-shadow: none; padding: 18px 14px 14px;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar::before { /* motif doré, en fondu vers le haut */
  content: ''; position: absolute; inset: auto 0 0 0; height: 260px; pointer-events: none;
  background-image: url('../img/motif-or.svg'); background-size: 64px 64px; opacity: .13;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent);
          mask-image: linear-gradient(to top, #000 10%, transparent);
}
.sidebar > * { position: relative; }
.sidebar-brand { padding: 4px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); gap: 12px; }
.brand-badge, .nb-logo {
  width: 42px; height: 42px; border-radius: 11px; background: transparent; box-shadow: none; padding: 0; overflow: hidden;
}
.brand-badge img, .nb-logo img { width: 100%; height: 100%; display: block; }
.brand-text { font-weight: 700; font-size: 1.12rem; letter-spacing: .01em; }
.brand-text small { font-weight: 500; opacity: .62; font-size: .72rem; letter-spacing: 0; margin-top: 3px; }

.side-cat { text-transform: none; letter-spacing: 0; font-size: .74rem; font-weight: 600;
  color: rgba(255,255,255,.42); padding: 18px 12px 6px; }
.side-link { padding: 9px 12px; margin: 1px 0; border-radius: 9px; font-weight: 500; font-size: .9rem;
  color: rgba(255,255,255,.74); gap: 11px; transition: background .15s, color .15s; }
.side-link i { font-size: 1.05rem; width: 20px; opacity: .85; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; transform: none; }
.side-link.active { background: rgba(224,168,46,.13); color: #fff; font-weight: 600; }
.side-link.active i { color: var(--or-clair); opacity: 1; }
.side-link.active::before { left: -14px; width: 3px; height: 22px; background: var(--or); border-radius: 0 3px 3px 0; }
.side-badge { background: var(--or); color: var(--vert-nuit); font-size: .7rem; padding: 1px 7px; animation: none; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.avatar { background: var(--or); color: var(--vert-nuit); border-radius: 10px; font-weight: 700; width: 38px; height: 38px; }
.role-chip { background: rgba(255,255,255,.1); font-weight: 500; }
.btn-logout { background: rgba(255,255,255,.06); border-radius: 10px; width: 36px; height: 36px; }
.btn-logout:hover { background: var(--rouge); }

/* ---- Barre supérieure ---- */
.topbar { height: 66px; background: rgba(242,245,243,.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ligne); padding: 0 32px; }
.hello-sub { color: var(--texte-doux); font-size: .78rem; }
.hello-name { color: var(--vert-nuit); font-weight: 700; font-size: 1.05rem; }
.topbar-actions { gap: 8px; }
.topbar-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--ligne);
  color: var(--vert-fonce); font-size: 1.08rem; }
.topbar-icon:hover { background: var(--vert-50); color: var(--vert); transform: none; border-color: var(--vert-100); }
.topbar-cta { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--vert); color: #fff; font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.topbar-cta:hover { background: var(--vert-fonce); color: #fff; }
.btn-installer[hidden] { display: none !important; }
.notif-count { background: var(--rouge); }

/* =====================================================================
   COMPOSANTS
   ===================================================================== */
/* ---- Cartes ---- */
.card, .card-chks { border: 1px solid var(--ligne); border-radius: var(--radius); box-shadow: var(--ombre); background: var(--carte); }
.card-chks { overflow: hidden; }
.card-header { background: #fff; border-bottom: 1px solid var(--ligne-douce); }
.card-chks h5.text-success, .card h5.text-success, .card-chks h5.fw-semibold { color: var(--vert-nuit) !important; font-weight: 700; font-size: 1.02rem; }
.card-chks h5 > .bi, .card h5 > .bi { color: var(--vert); }

/* ---- Boutons ---- */
.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; padding: .5rem 1rem; }
.btn-sm { border-radius: 8px; font-size: .8rem; padding: .32rem .7rem; }
.btn-lg { padding: .72rem 1.35rem; font-size: 1rem; border-radius: 12px; }
.btn-chks, .btn-success { background: var(--vert); border: 1px solid var(--vert); color: #fff; box-shadow: none; padding: .5rem 1.05rem; }
.btn-chks:hover, .btn-success:hover, .btn-chks:focus { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; transform: none; box-shadow: none; }
.btn-chks:focus-visible, .btn-success:focus-visible { box-shadow: 0 0 0 3px var(--or-clair); }
.btn-outline-success { color: var(--vert); border-color: var(--vert-100); background: #fff; }
.btn-outline-success:hover { background: var(--vert-50); color: var(--vert-fonce); border-color: var(--vert); }
.btn-warning { background: var(--or); border-color: var(--or); color: var(--vert-nuit); }
.btn-warning:hover { background: var(--or-clair); border-color: var(--or-clair); color: var(--vert-nuit); }
.btn-outline-secondary { border-color: var(--ligne); color: var(--texte-doux); background: #fff; }
.btn-outline-secondary:hover { background: var(--fond); color: var(--texte); border-color: #c9d4ce; }
.btn-outline-danger { border-color: #ecc6c1; color: var(--rouge); background: #fff; }
.btn-outline-danger:hover { background: var(--rouge); border-color: var(--rouge); }
.btn-danger { background: var(--rouge); border-color: var(--rouge); }
.btn-light { background: #fff; border-color: var(--ligne); }

/* ---- Formulaires ---- */
.form-label { font-weight: 600; font-size: .85rem; color: var(--texte); margin-bottom: 6px; }
.form-control, .form-select { border: 1px solid #ccd8d1; border-radius: var(--radius-sm); padding: .58rem .8rem; font-size: .93rem; background-color: #fff; }
.form-control::placeholder { color: #93a39b; }
.form-control:focus, .form-select:focus { border-color: var(--vert); box-shadow: 0 0 0 3px rgba(14,107,69,.14); }
.form-control-sm, .form-select-sm { padding: .34rem .6rem; font-size: .84rem; border-radius: 8px; }
.form-text { color: var(--texte-doux); font-size: .78rem; }
.form-check-input:checked { background-color: var(--vert); border-color: var(--vert); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(14,107,69,.16); border-color: var(--vert); }
.input-group-text { background: var(--fond); border-color: #ccd8d1; color: var(--texte-doux); border-radius: var(--radius-sm); }

/* ---- Tableaux ---- */
.table { --bs-table-hover-bg: #f5f9f7; color: var(--texte); }
.table > :not(caption) > * > * { padding: 12px 16px; border-bottom-color: var(--ligne-douce); }
.table thead th { background: #f7faf8; color: var(--texte-doux); font-weight: 600; font-size: .78rem;
  text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--ligne) !important; white-space: nowrap; }
.table-hover tbody tr:hover { background: #f5f9f7; }
.table-sm > :not(caption) > * > * { padding: 7px 10px; }

/* ---- Badges ---- */
.badge { font-weight: 600; border-radius: 6px; padding: .38em .62em; font-size: .74em; letter-spacing: .01em; }
.badge.bg-success { background: var(--vert-50) !important; color: var(--vert-fonce) !important; }
.badge.bg-warning { background: var(--or-50) !important; color: #7a5307 !important; }
.badge.bg-danger { background: var(--rouge-50) !important; color: var(--rouge) !important; }
.badge.bg-info { background: var(--bleu-50) !important; color: var(--bleu) !important; }
.badge.bg-secondary { background: #eef1ef !important; color: #3f4f48 !important; font-variant-numeric: tabular-nums; }
.badge.bg-primary { background: var(--bleu-50) !important; color: var(--bleu) !important; }
.badge.bg-dark { background: var(--vert-nuit) !important; color: #fff !important; }

/* ---- Alertes ---- */
.alert { border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 500; font-size: .92rem; }
.alert-success { background: var(--vert-50); color: var(--vert-fonce); border-color: var(--vert-100); }
.alert-danger { background: var(--rouge-50); color: var(--rouge); border-color: #f2d1cc; }
.alert-warning { background: var(--or-50); color: #6f4c08; border-color: #f1dfb1; }
.alert-info { background: var(--bleu-50); color: var(--bleu); border-color: #d3e2ef; }
.alert > .bi:first-child { margin-right: 4px; }

/* ---- Progression / onglets / pagination ---- */
.progress { background: var(--ligne-douce); border-radius: 99px; }
.progress-bar { background: var(--vert); }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { color: var(--vert-nuit); font-weight: 600; }
.nav-pills .nav-link.active { background: var(--vert); color: #fff; }
.page-link { color: var(--vert); }
.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--ombre-forte); }
.dropdown-menu { border: 1px solid var(--ligne); border-radius: var(--radius-sm); box-shadow: var(--ombre-forte); }

/* ---- Cloche ---- */
.notif-panel { border: 1px solid var(--ligne); border-radius: var(--radius); box-shadow: var(--ombre-forte); }

/* =====================================================================
   TABLEAU DE BORD
   ===================================================================== */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--ligne); }
.dash-head h1 { font-family: var(--f-titre); font-weight: 600; font-size: 2rem; color: var(--vert-nuit); margin: 0; letter-spacing: -.015em; }
.dash-head .dash-date { color: var(--texte-doux); margin: 4px 0 0; }
.dash-verset { display: flex; align-items: center; gap: 14px; text-align: right; }
.dash-verset .ar { font-family: var(--f-arabe); font-size: 1.55rem; color: var(--vert); line-height: 1.2; }
.dash-verset small { display: block; color: var(--texte-doux); font-size: .8rem; }
.dash-verset::before { content: ''; width: 46px; height: 46px; flex-shrink: 0; background: url('../img/motif-or.svg') center/46px; opacity: .9; }

.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-action { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; background: #fff;
  border: 1px solid var(--ligne); border-radius: 12px; color: var(--texte); text-decoration: none; font-weight: 600; font-size: .9rem; }
.dash-action i { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--vert-50); color: var(--vert); font-size: 1rem; }
.dash-action:hover { border-color: var(--vert); color: var(--vert-nuit); }
.dash-action.principale { background: var(--vert); border-color: var(--vert); color: #fff; }
.dash-action.principale i { background: rgba(255,255,255,.14); color: #fff; }
.dash-action.principale:hover { background: var(--vert-fonce); color: #fff; }

/* Indicateurs : une ligne chiffrée, pas une grille de cartes identiques */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--ligne);
  border-radius: var(--radius); box-shadow: var(--ombre); margin-bottom: 24px; overflow: hidden; }
.kpi { padding: 18px 22px; border-right: 1px solid var(--ligne-douce); border-bottom: 1px solid var(--ligne-douce);
  text-decoration: none; color: inherit; display: block; min-width: 0; }
.kpi:nth-child(4n) { border-right: none; }
.kpi:nth-last-child(-n+4) { border-bottom: none; }
a.kpi:hover { background: #f7faf8; }
.kpi-lib { display: flex; align-items: center; gap: 8px; color: var(--texte-doux); font-size: .84rem; font-weight: 500; }
.kpi-lib i { color: var(--vert); font-size: .95rem; }
.kpi-val { font-size: 1.85rem; font-weight: 700; color: var(--vert-nuit); line-height: 1.15; margin-top: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val small { font-size: .9rem; font-weight: 600; color: var(--texte-doux); letter-spacing: 0; }
.kpi.alerte .kpi-val { color: var(--rouge); }
.kpi.alerte .kpi-lib i { color: var(--rouge); }
.kpi.or .kpi-lib i { color: var(--or-fonce); }

/* Anciennes tuiles (encore utilisées par certaines pages) */
.stat-card { border: 1px solid var(--ligne); box-shadow: var(--ombre); border-radius: var(--radius); }
.stat-card::after { display: none; }
.stat-card:hover { transform: none; box-shadow: var(--ombre); border-color: var(--vert-100); }
.stat-card i { background: var(--vert-50); color: var(--vert); width: 46px; height: 46px; border-radius: 11px; font-size: 1.25rem; }
.stat-card.warn i { background: var(--rouge-50); color: var(--rouge); }
.stat-card.gold i { background: var(--or-50); color: var(--or-fonce); }
.stat-card.blue i { background: var(--bleu-50); color: var(--bleu); }
.stat-card h4 { color: var(--vert-nuit); font-weight: 700; }
.dash-hero { background: var(--vert-nuit); box-shadow: none; border-radius: var(--radius); position: relative; }
.dash-hero::after { content: ''; inset: 0; right: 0; bottom: 0; font-size: 0; background: url('../img/motif-or.svg') right center/64px; opacity: .12;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 60%); mask-image: linear-gradient(to left, #000, transparent 60%); }
.dash-hero-text h3 { font-family: var(--f-titre); }
.dash-hero-quote { background: rgba(255,255,255,.08); }

/* =====================================================================
   FORMULAIRE « NOUVEL ÉLÈVE »
   ===================================================================== */
.form-etapes { display: grid; gap: 20px; }
.form-bloc { background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius); box-shadow: var(--ombre); }
.form-bloc-tete { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--ligne-douce); }
.form-bloc-num { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--vert-nuit); color: var(--or-clair);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.form-bloc-tete h2 { font-size: 1.02rem; font-weight: 700; margin: 3px 0 2px; color: var(--vert-nuit); }
.form-bloc-tete p { margin: 0; color: var(--texte-doux); font-size: .84rem; }
.form-bloc-corps { padding: 20px 22px 22px; }
.choix-validation { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--vert-100); background: var(--vert-50); cursor: pointer; }
.choix-validation .form-check-input { margin-top: 3px; width: 1.2em; height: 1.2em; flex-shrink: 0; }
.choix-validation strong { display: block; color: var(--vert-nuit); }
.choix-validation span { color: var(--texte-doux); font-size: .85rem; }
.depot { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed #bccbc3;
  border-radius: var(--radius-sm); background: #fbfcfb; min-height: 62px; }
.depot:hover { border-color: var(--vert); background: var(--vert-50); }
.depot i { font-size: 1.3rem; color: var(--vert); }
.depot strong { font-size: .86rem; display: block; }
.depot small { color: var(--texte-doux); font-size: .74rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.depot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot.rempli { border-style: solid; border-color: var(--vert); background: var(--vert-50); }
.barre-envoi { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; gap: 10px; align-items: center;
  padding: 14px 0; background: linear-gradient(to top, var(--fond) 70%, transparent); }

/* =====================================================================
   SITE PUBLIC
   ===================================================================== */
.navbar-chks { background: var(--vert-nuit); border-bottom: 1px solid rgba(224,168,46,.35); box-shadow: none; min-height: 70px; }
.navbar-chks .nav-link { font-weight: 500 !important; }
.navbar-chks .nav-link.active::after, .navbar-chks .nav-link:hover::after { background: var(--or) !important; }
.nb-nom strong { font-weight: 700; letter-spacing: .01em; }
.nb-nom small { text-transform: none !important; letter-spacing: 0 !important; color: var(--or-clair) !important; opacity: .9; }
.nb-cta { background: var(--or) !important; color: var(--vert-nuit) !important; box-shadow: none !important; border-radius: 10px !important; font-weight: 700 !important; }
.nb-cta:hover { background: var(--or-clair) !important; transform: none !important; }
.nb-connexion { border-radius: 10px !important; }

.accueil-hero { position: relative; background: var(--vert-nuit); color: #fff; overflow: hidden; }
.accueil-hero::before { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') 0 0/88px; opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse at 15% 40%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 15% 40%, #000 0%, transparent 70%); }
.accueil-hero .container { position: relative; }
.ah-grille { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; padding: 72px 0 0; }
.ah-autorisation { display: inline-flex; align-items: center; gap: 8px; color: var(--or-clair); font-size: .85rem; font-weight: 500;
  border: 1px solid rgba(224,168,46,.4); border-radius: 99px; padding: 5px 14px; margin-bottom: 22px; }
.ah-bismillah { text-align: left; font-family: var(--f-arabe); font-size: 1.7rem; color: var(--or-clair); margin-bottom: 10px; line-height: 1.4; }
.accueil-hero h1 { font-family: var(--f-titre); font-weight: 600; font-size: clamp(2.2rem, 4.2vw, 3.5rem); line-height: 1.06;
  letter-spacing: -.02em; margin: 0 0 20px; max-width: 15ch; }
.accueil-hero h1 span { display: block; color: var(--or-clair); font-weight: 500; font-size: .62em; letter-spacing: -.005em; margin-top: 10px; }
.ah-intro { font-size: 1.1rem; line-height: 1.65; color: rgba(255,255,255,.82); max-width: 52ch; margin-bottom: 30px; }
.ah-boutons { display: flex; gap: 12px; flex-wrap: wrap; }
.ah-boutons .btn-outline-light { border-color: rgba(255,255,255,.4); }
.ah-boutons .btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.ah-arche { position: relative; align-self: end; }
.ah-arche img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; display: block;
  border-radius: 999px 999px 0 0; border: 6px solid rgba(224,168,46,.9); border-bottom: none; }
.ah-arche figcaption { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(6,46,32,.86);
  backdrop-filter: blur(6px); color: #fff; font-size: .82rem; padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
.ah-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.12); margin-top: 0; }
.ah-chiffres div { padding: 22px 0; }
.ah-chiffres div + div { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.12); }
.ah-chiffres strong { display: block; font-family: var(--f-titre); font-size: 1.6rem; font-weight: 600; color: #fff; }
.ah-chiffres span { color: rgba(255,255,255,.66); font-size: .88rem; }

.piliers { padding: 88px 0 72px; }
.piliers-tete { max-width: 640px; margin-bottom: 44px; }
.piliers-tete h2, .bloc-titre { font-family: var(--f-titre); font-weight: 600; color: var(--vert-nuit); font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.015em; }
.piliers-tete p { color: var(--texte-doux); font-size: 1.05rem; }
.piliers-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; background: var(--ligne); border: 1px solid var(--ligne); border-radius: var(--radius); overflow: hidden; }
.pilier { background: #fff; padding: 30px 28px; }
.pilier i { font-size: 1.6rem; color: var(--vert); }
.pilier h3 { font-size: 1.12rem; font-weight: 700; margin: 14px 0 8px; color: var(--vert-nuit); }
.pilier p { color: var(--texte-doux); margin: 0; line-height: 1.6; }
.pilier.majeur { grid-row: span 2; background: var(--vert-50); display: flex; flex-direction: column; }
.pilier.majeur h3 { font-family: var(--f-titre); font-size: 1.6rem; font-weight: 600; }
.pilier.majeur .ar { font-family: var(--f-arabe); color: var(--vert); font-size: 2.4rem; line-height: 1.3; margin-top: auto; padding-top: 24px; }

.acces-rapides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acces { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius);
  text-decoration: none; color: var(--texte); }
.acces:hover { border-color: var(--vert); color: var(--texte); }
.acces i { font-size: 1.4rem; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--vert-nuit); color: var(--or-clair); flex-shrink: 0; }
.acces strong { display: block; font-size: 1.02rem; margin-bottom: 3px; color: var(--vert-nuit); }
.acces span { color: var(--texte-doux); font-size: .9rem; }

.affiches { padding: 80px 0; background: #fff; border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.affiches-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.affiche { border: 1px solid var(--ligne); border-radius: var(--radius); overflow: hidden; background: var(--fond); }
.affiche a.apercu { display: block; aspect-ratio: 4/5; overflow: hidden; background: #eef2f0; }
.affiche img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.affiche a.apercu:hover img { transform: scale(1.02); }
.affiche-pied { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px; background: #fff; border-top: 1px solid var(--ligne); }
.affiche-pied strong { color: var(--vert-nuit); }

.mot-directeur { padding: 88px 0; }
.md-grille { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.md-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 999px 999px 14px 14px; border: 5px solid var(--or); }
.md-citation { font-family: var(--f-titre); font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.5; color: var(--vert-nuit); font-weight: 500; margin: 18px 0 26px; max-width: 46ch; }
.md-signature strong { display: block; font-size: 1.05rem; }
.md-signature span { color: var(--texte-doux); }
.md-contacts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; color: var(--texte-doux); }
.md-contacts i { color: var(--vert); margin-right: 6px; }

.footer-chks { background: var(--vert-nuit); position: relative; overflow: hidden; }
.footer-chks::before { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') 0 0/72px; opacity: .06; }
.footer-chks .container { position: relative; }
.footer-chks h5, .footer-chks h6 { color: #fff; }
.footer-chks a { color: rgba(255,255,255,.75); }

/* Pages publiques (inscription, paiement, connexion) */
.page-publique-tete { background: var(--vert-nuit); color: #fff; padding: 44px 0 40px; position: relative; overflow: hidden; }
.page-publique-tete::before { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') right center/72px; opacity: .1;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 55%); mask-image: linear-gradient(to left, #000, transparent 55%); }

/* ---- Écrans de connexion ---- */
.ecran-connexion { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1fr 1fr; }
.ec-visuel { background: var(--vert-nuit); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.ec-visuel::before { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') 0 0/80px; opacity: .12; }
.ec-visuel > * { position: relative; }
.ec-visuel h2 { font-family: var(--f-titre); font-weight: 600; font-size: 2.3rem; line-height: 1.12; max-width: 14ch; letter-spacing: -.015em; }
.ec-visuel p { color: rgba(255,255,255,.75); max-width: 40ch; }
.ec-visuel .ar { font-family: var(--f-arabe); font-size: 1.6rem; color: var(--or-clair); }
.ec-formulaire { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.ec-carte { width: 100%; max-width: 400px; }
.ec-carte h1 { font-family: var(--f-titre); font-weight: 600; font-size: 1.9rem; color: var(--vert-nuit); margin: 18px 0 6px; }
.ec-carte .ec-sous { color: var(--texte-doux); margin-bottom: 28px; }
.ec-logo { width: 52px; height: 52px; }
.ec-aide { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ligne); font-size: .88rem; color: var(--texte-doux); }
.ec-aide a { font-weight: 600; }
.eleve-login { background: var(--vert-nuit); position: relative; }
.eleve-login::before { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') 0 0/80px; opacity: .1; }
.eleve-login-card { position: relative; border-radius: 18px; }

/* =====================================================================
   ESPACE ÉLÈVE / PARENT
   ===================================================================== */
.eleve-topbar { background: var(--vert-nuit); box-shadow: none; border-bottom: 1px solid rgba(224,168,46,.3); padding: 10px 0; }
.eleve-brand .brand-text { font-weight: 700; }
.eleve-nav a { font-weight: 500; border-radius: 9px; }
.eleve-nav a.active { background: rgba(224,168,46,.16); color: #fff; }
.eleve-nav a.active i { color: var(--or-clair); }
.eleve-topbar .topbar-icon, .eleve-topbar .btn-logout { background: rgba(255,255,255,.08); border: none; color: #fff; }
.eleve-hero { background: var(--vert-nuit); box-shadow: none; position: relative; overflow: hidden; }
.eleve-hero::after { content: ''; position: absolute; inset: 0; background: url('../img/motif-or.svg') right center/64px; opacity: .14;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 55%); mask-image: linear-gradient(to left, #000, transparent 55%); pointer-events: none; }
.eleve-hero > * { position: relative; z-index: 1; }
.eleve-hero h3 { color: #fff; font-family: var(--f-titre); font-weight: 600 !important; }
.eleve-hero .hero-avatar { background: var(--or); border-radius: 50%; }
.eleve-nav-mobile { border-top: 1px solid var(--ligne); box-shadow: none; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.eleve-nav-mobile a.active { color: var(--vert); font-weight: 600; }
.eleve-nav-mobile a.active i { color: var(--vert); }
.result-tile { background: #fff; border: 1px solid var(--ligne); }
.result-tile:hover { background: var(--vert-50); border-color: var(--vert-100); transform: none; }
.result-tile .rt-icon { background: var(--or-50); color: var(--or-fonce); }

/* ---- Bandeau d'installation (PWA) ---- */
.pwa-bandeau { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080; max-width: 460px; margin: 0 auto;
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--ligne);
  border-radius: 14px; box-shadow: var(--ombre-forte); }
.pwa-bandeau[hidden] { display: none; }
.pwa-bandeau img { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.pwa-bandeau .pb-txt { flex: 1; min-width: 0; font-size: .86rem; color: var(--texte-doux); line-height: 1.35; }
.pwa-bandeau .pb-txt strong { display: block; color: var(--vert-nuit); font-size: .95rem; }
.pwa-bandeau .pb-fermer { background: none; border: none; color: var(--texte-doux); font-size: 1.2rem; padding: 4px; }
.eleve-body .pwa-bandeau { bottom: 84px; }
.pwa-hors-ligne { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; background: var(--or); color: var(--vert-nuit);
  text-align: center; font-size: .85rem; font-weight: 600; padding: 6px; }
.pwa-hors-ligne[hidden] { display: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(4n) { border-right: 1px solid var(--ligne-douce); }
  .kpi:nth-child(2n) { border-right: none; }
  .kpi:nth-last-child(-n+4) { border-bottom: 1px solid var(--ligne-douce); }
  .kpi:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 992px) {
  .content { padding: 20px 18px 40px; }
  .topbar { padding: 0 16px; }
  .ah-grille { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .ah-arche { max-width: 420px; margin: 0 auto; width: 100%; }
  .piliers-grille { grid-template-columns: 1fr 1fr; }
  .pilier.majeur { grid-row: auto; grid-column: span 2; }
  .acces-rapides { grid-template-columns: 1fr; }
  .md-grille { grid-template-columns: 1fr; gap: 32px; }
  .md-photo { max-width: 280px; }
  .ecran-connexion { grid-template-columns: 1fr; }
  .ec-visuel { padding: 32px 24px; }
  .ec-visuel h2 { font-size: 1.6rem; }
  .ec-visuel .ec-masquer { display: none; }
  .topbar-cta span { display: none; }
  .topbar-cta { padding: 0 12px; }
}
@media (max-width: 768px) {
  .dash-head h1 { font-size: 1.6rem; }
  .dash-verset { display: none; }
  .kpi { padding: 14px 16px; }
  .kpi-val { font-size: 1.45rem; }
  .ah-chiffres { grid-template-columns: 1fr 1fr; }
  .ah-chiffres div:nth-child(3) { padding-left: 0; border-left: none; }
  .ah-chiffres div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
  .affiches-grille { grid-template-columns: 1fr; }
  .piliers-grille { grid-template-columns: 1fr; }
  .pilier.majeur { grid-column: auto; }
  .content > h3.fw-bold:first-child, .content > .d-flex:first-child h3.fw-bold, .page-titre { font-size: 1.4rem; }
  .form-bloc-tete, .form-bloc-corps { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .pwa-bandeau, .pwa-hors-ligne, .topbar-cta { display: none !important; }
}

/* ---- Harmonisation des pages existantes ---- */
.content h3.fw-bold { font-family: var(--f-titre); font-weight: 600 !important; color: var(--vert-nuit); letter-spacing: -.01em; }
.content h3.fw-bold > .bi:first-child { color: var(--or-fonce); font-size: .78em; margin-right: 4px; vertical-align: .05em; }
.content h4.fw-bold, .content h5.fw-bold { color: var(--vert-nuit); }
.bloc-identifiants { background: var(--vert-nuit) !important; color: #fff; }
.bloc-identifiants .card-body, .bloc-identifiants > div { position: relative; }
.ident-box { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(224,168,46,.4); }
.ident-box strong { color: var(--or-clair); }
.emploi-card { border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.emploi-card:hover { transform: none; border-color: var(--vert); box-shadow: var(--ombre); }
.card-chks.p-4 > h5:first-child, .card-chks .card-body > h5:first-child { margin-bottom: 1rem; }
/* Titres posés sur un fond vert : garder le blanc */
.content [style*="color:#fff"] .fw-bold, .content [style*="color: #fff"] .fw-bold,
.content .text-white .fw-bold, .content .bg-success .fw-bold, .content .text-white.fw-bold { color: inherit !important; }
@media (max-width: 520px) {
  .pwa-bandeau { flex-wrap: wrap; padding: 14px 44px 14px 14px; left: 10px; right: 10px; }
  .pwa-bandeau .pb-txt { flex: 1 1 0; }
  .pwa-bandeau .btn { flex: 1 1 100%; order: 3; padding: .55rem; }
  .pwa-bandeau .pb-fermer { position: absolute; top: 8px; right: 8px; }
}

/* =====================================================================
   MOBILE — corrections après essai sur iPhone
   ===================================================================== */
/* Application installée : ne pas passer sous la barre d'état (heure, batterie) */
.navbar-chks.sticky-top, .eleve-topbar { padding-top: env(safe-area-inset-top); }
.topbar { padding-top: env(safe-area-inset-top); height: calc(66px + env(safe-area-inset-top)); }
.sidebar { padding-top: calc(18px + env(safe-area-inset-top)); }
.eleve-body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.pwa-hors-ligne { padding-top: calc(6px + env(safe-area-inset-top)); }

/* Tableaux transformés en fiches (voir assets/js/tableaux-mobiles.js) */
@media (max-width: 640px) {
  .table-responsive:has(.table-cartes) { overflow: visible; }
  .table-cartes, .table-cartes tbody, .table-cartes tr, .table-cartes td { display: block; width: 100%; }
  .table-cartes thead { display: none; }
  .table-cartes tbody { padding: 4px 12px 8px; }
  .table-cartes tbody tr { background: #fff; border: 1px solid var(--ligne); border-radius: 12px; margin: 10px 0; padding: 6px 0;
    box-shadow: 0 1px 2px rgba(6,46,32,.04); }
  .table-cartes.table-hover tbody tr:hover { background: #fff; }
  .table-cartes > :not(caption) > * > * { padding: 7px 14px !important; border: none !important; box-shadow: none !important; background: transparent !important; }
  .table-cartes td { text-align: right; min-height: 0; overflow: hidden; }
  .table-cartes td::before { content: attr(data-label); float: left; max-width: 46%; margin-right: 14px; text-align: left;
    color: var(--texte-doux); font-weight: 600; font-size: .78rem; line-height: 1.9; }
  .table-cartes td[data-label=""]::before, .table-cartes td.sans-label::before { display: none; }
  .table-cartes td form { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 100%; }
  .table-cartes td form .form-select { width: auto; max-width: 100%; }
  .table-cartes td:first-child { border-bottom: 1px solid var(--ligne-douce) !important; padding-bottom: 9px !important; margin-bottom: 3px; }
  .table-cartes td .d-flex, .table-cartes td .btn-group { justify-content: flex-end; flex-wrap: wrap; }
  .table-cartes tr.ligne-vide { border: none; background: transparent; box-shadow: none; margin: 0; }
  .table-cartes tr.ligne-vide td { display: block; text-align: center; }
  .table-cartes tr.ligne-vide td[colspan]:not(.text-center) { text-align: left; font-weight: 700; color: var(--vert); padding-top: 14px !important; }
  .table-cartes td.text-end, .table-cartes td.text-center { text-align: right !important; }
}


@media (max-width: 576px) {
  /* Marges latérales plus confortables sur les pages publiques */
  .public-body .container { --bs-gutter-x: 2.5rem; }
  .content { padding: 16px 16px 40px; }

  /* Accueil */
  .ah-grille { padding-top: 28px; gap: 4px; }
  .ah-grille > div:first-child { padding-bottom: 28px !important; }
  .ah-autorisation { font-size: .74rem; padding: 4px 11px; margin-bottom: 16px; }
  .ah-bismillah { font-size: 1.45rem; margin-bottom: 6px; }
  .accueil-hero h1 { font-size: 2.15rem; margin-bottom: 14px; }
  .ah-intro { font-size: 1rem; line-height: 1.6; margin-bottom: 22px; }
  .ah-boutons { flex-direction: column; gap: 10px; }
  .ah-boutons .btn { width: 100%; justify-content: center; display: flex; align-items: center; gap: 8px; }
  .ah-arche { max-width: 290px; }
  .ah-arche img { aspect-ratio: 1 / 1.05; border-width: 5px; }
  .ah-chiffres div { padding: 16px 0; }
  .ah-chiffres div + div { padding-left: 16px; }
  .ah-chiffres strong { font-size: 1.25rem; }
  .ah-chiffres span { font-size: .8rem; }
  .piliers, .mot-directeur, .affiches { padding: 52px 0; }
  .piliers-tete { margin-bottom: 26px; }
  .pilier { padding: 22px 20px; }
  .pilier.majeur .ar { font-size: 2rem; padding-top: 14px; }
  .acces { padding: 18px; }
  .md-photo { max-width: 210px; margin: 0 auto; }
  .md-citation { font-size: 1.15rem; }
  .affiche-pied { flex-wrap: wrap; }

  /* Connexions : bandeau visuel plus compact */
  .ec-visuel { padding: 22px 20px; gap: 6px; }
  .ec-visuel h2 { font-size: 1.4rem; margin: 0; }
  .ec-visuel .ar { font-size: 1.25rem; }
  .ec-formulaire { padding: 28px 20px; align-items: start; }
  .ec-carte h1 { font-size: 1.6rem; margin-top: 12px; }
  .ec-carte .ec-sous { margin-bottom: 20px; }

  /* Tableau de bord : raccourcis en grille régulière */
  .dash-head { padding-bottom: 14px; margin-bottom: 16px; }
  .dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-action { padding: 8px 10px 8px 8px; font-size: .82rem; line-height: 1.2; }
  .dash-action.principale { grid-column: 1 / -1; }
  .card-header.d-flex { flex-wrap: wrap; gap: 8px; }

  /* Espace parent */
  .eleve-main { padding: 16px 0; }
  .eleve-hero { padding: 20px; gap: 12px; }
  .eleve-hero h3 { font-size: 1.35rem; }
  .eleve-hero .hero-avatar { width: 52px; height: 52px; font-size: 1.15rem; }
  .card-chks.p-4 { padding: 18px !important; }
}
@media (max-width: 640px) {
  .table-cartes td:has(form)::before { float: none; display: block; max-width: none; margin: 0 0 6px; }
  .table-cartes td:has(form) { text-align: left; }
  .table-cartes td:has(form) > .d-flex { justify-content: flex-start; }
  .table-cartes td form { display: flex !important; width: 100%; flex-wrap: nowrap; justify-content: flex-start; margin-top: 4px; }
  .table-cartes td form .form-select { flex: 1 1 auto; width: 1%; min-width: 0; max-width: none !important; }
}

/* Haut de l'écran sur iPhone (Safari iOS 26 colore la zone de l'heure d'après
   le fond de la page) : vert foncé sur le site public et l'espace parent,
   clair dans l'administration dont la barre du haut est claire. */
html { background-color: var(--vert-nuit); }
html:has(body.admin-body) { background-color: var(--fond); }

/* Safari iOS 26 ignore theme-color : il colore la zone de l'heure d'après
   un élément FIXE en haut de l'écran (sinon le fond du body, clair ici).
   Cette bande fixe, de la hauteur de la barre d'état, impose le vert. */
.barre-etat-ios { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px);
  background: var(--vert-nuit); z-index: 2000; pointer-events: none; }

/* Safari iOS 26 : la zone de l'heure prend la couleur de fond du BODY.
   Le body est donc vert foncé sur le site public et l'espace parent,
   et le contenu clair est posé dans son propre bloc. */
body.public-body, body.eleve-body { background-color: var(--vert-nuit); }
.public-body .page-contenu { background: var(--fond); }
.eleve-body .eleve-main { background: var(--fond); min-height: calc(100vh - 60px); }
.eleve-body { padding-bottom: 0; }
.eleve-body .eleve-main { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .eleve-body .eleve-main { padding-bottom: 40px; } }
.footer-chks { margin-top: 0 !important; }

/* ---- Page « affiche des frais » ---- */
.affiche-page { padding: 28px 0 56px; }
.affiche-barre { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.affiche-barre .btn { flex-shrink: 0; }
.affiche-titre h1 { font-family: var(--f-titre); font-weight: 600; font-size: 1.6rem; color: var(--vert-nuit); margin: 0; }
.affiche-titre p { color: var(--texte-doux); margin: 2px 0 0; font-size: .9rem; }
.affiche-cadre { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius);
  box-shadow: var(--ombre); overflow: hidden; }
.affiche-cadre img { width: 100%; height: auto; display: block; }
.affiche-actions { max-width: 900px; margin: 20px auto 0; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 576px) {
  .affiche-page { padding: 16px 0 40px; }
  .affiche-barre { gap: 12px; margin-bottom: 14px; }
  .affiche-barre .btn { padding: .45rem .8rem; }
  .affiche-titre h1 { font-size: 1.25rem; }
  .affiche-titre p { font-size: .8rem; }
  .public-body .affiche-page .container { --bs-gutter-x: 1.25rem; }
  .affiche-cadre { border-radius: 10px; }
  .affiche-actions { flex-direction: column; }
  .affiche-actions .btn { width: 100%; }
}

/* ---- Accueil sur ordinateur : tout l'essentiel visible sans défiler ---- */
@media (min-width: 993px) {
  .ah-grille { padding-top: clamp(28px, 5vh, 56px); gap: 48px; grid-template-columns: 1.15fr .85fr; }
  .ah-grille > div:first-child { padding-bottom: clamp(24px, 4vh, 48px) !important; }
  .ah-autorisation { margin-bottom: 14px; }
  .ah-bismillah { font-size: 1.45rem; margin-bottom: 4px; }
  .accueil-hero h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); margin-bottom: 14px; }
  .ah-intro { font-size: 1.02rem; margin-bottom: 22px; }
  .ah-arche { justify-self: end; width: 100%; max-width: 420px; }
  .ah-arche img { aspect-ratio: auto; height: clamp(300px, 58vh, 500px); }
  .ah-chiffres div { padding: 16px 0; }
  .ah-chiffres strong { font-size: 1.35rem; }
}

/* ---- Accueil sur téléphone : titre, texte et boutons visibles sans défiler ---- */
@media (max-width: 576px) {
  .ah-grille { padding-top: 18px; }
  .ah-grille > div:first-child { padding-bottom: 22px !important; }
  .ah-autorisation { font-size: .7rem; padding: 3px 10px; margin-bottom: 12px; }
  .ah-bismillah { font-size: 1.25rem; margin-bottom: 8px; line-height: 1.5; }
  .accueil-hero h1 { font-size: 1.9rem; line-height: 1.08; margin-bottom: 10px; }
  .accueil-hero h1 span { font-size: .66em; margin-top: 6px; }
  .ah-intro { font-size: .95rem; line-height: 1.55; margin-bottom: 18px; }
  .ah-boutons { flex-direction: column; gap: 8px; }
  .ah-boutons .btn { width: 100%; padding: .62rem 1rem; font-size: .98rem; border-radius: 11px; white-space: nowrap; }
  .ah-arche { max-width: 250px; }
  .ah-arche img { aspect-ratio: auto; height: 230px; border-width: 4px; }
  .ah-arche figcaption { bottom: 12px; font-size: .74rem; padding: 5px 11px; }
}

/* ---- Administration sur téléphone : zone de l'heure en vert (Safari iOS 26) ----
   Le body passe en vert foncé (Safari lit sa couleur), le contenu garde son fond
   clair, et la barre du haut devient verte pour rester cohérente. */
@media (max-width: 992px) {
  html:has(body.admin-body), body.admin-body { background-color: var(--vert-nuit); }
  .admin-body .main-wrap { background: var(--fond); min-height: 100vh; }
  .admin-body .topbar { background: var(--vert-nuit); backdrop-filter: none; border-bottom: 1px solid rgba(224,168,46,.3); }
  .admin-body .btn-burger { color: #fff; }
  .admin-body .hello-sub { color: rgba(255,255,255,.65); }
  .admin-body .hello-name { color: #fff; }
  .admin-body .topbar-icon { background: rgba(255,255,255,.08); border-color: transparent; color: #fff; }
  .admin-body .topbar-icon:hover { background: rgba(255,255,255,.16); color: #fff; }
  .admin-body .topbar-cta { background: var(--or); color: var(--vert-nuit); }
  .admin-body .topbar-cta:hover { background: var(--or-clair); color: var(--vert-nuit); }
}
