/*
 * MesActes — espace étudiant : coque « fintech / SaaS » (barre latérale 260 px, barre supérieure, cartes de suivi).
 * Chargé après les feuilles Scolarix, uniquement par layouts/etudiant.html.twig ; tout est préfixé .me-etu / me-*.
 * Valeurs de la maquette maquettes/dashboard-etudiant.html. Texte sémantique assombri pour tenir le contraste AA.
 * Aucune police ni ressource externe (CSP stricte).
 */
.me-etu {
  --e-primaire: #6D28D9; --e-primaire-fonce: #5B21B6; --e-doux: #F5F3FF; --e-doux-bord: #DDD6FE;
  --e-fond: #F8FAFC; --e-carte: #FFFFFF; --e-bord: #E2E8F0; --e-bord-fort: #CBD5E1;
  --e-texte: #0F172A; --e-texte-2: #475569; --e-texte-3: #5B6B80;
  --e-succes-fond: #ECFDF5; --e-succes: #047857;
  --e-info-fond: #EFF6FF; --e-info: #1D4ED8;
  --e-attention-fond: #FFFBEB; --e-attention: #B45309;
  --e-ombre: 0 1px 3px rgba(15, 23, 42, .04);
  --e-ombre-haute: 0 8px 24px rgba(109, 40, 217, .10), 0 2px 6px rgba(15, 23, 42, .05);
  --e-rayon: 12px; --e-lateral: 260px;
  --e-titres: "Plus Jakarta Sans", system-ui, sans-serif;
  --e-texte-police: "MA-Espace", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--e-fond); color: var(--e-texte); font-family: var(--e-texte-police); font-size: .9375rem;
  -webkit-font-smoothing: antialiased;
}
.me-etu h1, .me-etu h2, .me-etu h3 { font-family: var(--e-titres); letter-spacing: -.02em; color: var(--e-texte); }
.me-etu :focus-visible { outline: 2px solid var(--e-primaire); outline-offset: 2px; }
.me-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.me-mono, .me-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Boutons */
.me-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; font: 600 .9rem/1 var(--e-texte-police); text-decoration: none; cursor: pointer; transition: all .18s ease; }
.me-btn .icon { font-size: 1.1rem; }
.me-btn--bloc { width: 100%; }
.me-btn--primaire { background: var(--e-primaire); color: #fff; box-shadow: 0 4px 12px rgba(109, 40, 217, .25); }
.me-btn--primaire:hover { background: var(--e-primaire-fonce); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(109, 40, 217, .32); }
.me-btn--contour { background: #fff; color: var(--e-texte-2); border-color: var(--e-bord-fort); }
.me-btn--contour:hover { background: var(--e-fond); color: var(--e-texte); border-color: var(--e-texte-3); }
.me-btn--wa { background: #15803D; color: #fff; }
.me-btn--wa:hover { background: #166534; color: #fff; transform: translateY(-1px); }
.me-icone-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--e-bord); background: #fff; color: var(--e-texte-2);
  display: inline-grid; place-items: center; position: relative; cursor: pointer; transition: all .15s; padding: 0; }
.me-icone-btn:hover { border-color: var(--e-bord-fort); color: var(--e-texte); }
.me-icone-btn .icon { font-size: 1.25rem; }

/* ------------------------------------------------------------------ Barre latérale */
.me-side { position: fixed; inset: 0 auto 0 0; z-index: 1050; width: min(var(--e-lateral), 86vw); display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--e-bord); padding: 16px; transform: translateX(-100%); transition: transform .25s ease; visibility: hidden; }
.me-menu-ouvert .me-side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(15, 23, 42, .2); }
.me-voile { position: fixed; inset: 0; z-index: 1040; background: rgba(15, 23, 42, .45); }
.me-voile[hidden] { display: none; }
.me-side__tete { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 24px; }
.me-marque img { display: block; height: 34px; width: auto; }
.me-menu { display: grid; gap: 4px; }
.me-menu__lien { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px;
  color: var(--e-texte-2); font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.me-menu__lien .icon { font-size: 1.25rem; }
.me-menu__lien:hover { background: var(--e-fond); color: var(--e-texte); }
.me-menu__lien.is-actif { background: var(--e-doux); color: var(--e-primaire); font-weight: 600; }
.me-menu__lien.is-actif::before { content: ""; position: absolute; left: -16px; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: var(--e-primaire); }
.me-menu__compte { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--e-primaire); color: #fff;
  font-size: .75rem; font-weight: 600; display: grid; place-items: center; }
.me-menu__point, .me-point { width: 9px; height: 9px; border-radius: 50%; background: #DC2626; }
.me-menu__point { margin-left: auto; }
.me-point { position: absolute; top: 10px; right: 11px; box-shadow: 0 0 0 2px #fff; }
.me-aide { margin-top: auto; padding: 16px; border-radius: var(--e-rayon); background: var(--e-doux); border: 1px solid #EDE9FE; }
.me-aide__titre { margin: 0 0 4px; font-weight: 600; font-size: .9rem; }
.me-aide__texte { margin: 0 0 12px; font-size: .8rem; color: var(--e-texte-2); }
.me-side__fermer { border: 0; }

/* ------------------------------------------------------------------ Barre supérieure */
.me-haut { position: sticky; top: 0; z-index: 1020; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: rgba(248, 250, 252, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--e-bord); }
.me-haut__gauche, .me-haut__droite { display: flex; align-items: center; gap: 12px; min-width: 0; }
.me-fil { display: none; align-items: center; gap: 8px; font-size: .85rem; color: var(--e-texte-3); }
.me-fil a { color: var(--e-texte-3); text-decoration: none; }
.me-fil a:hover { color: var(--e-primaire); }
.me-fil [aria-current] { color: var(--e-texte); font-weight: 500; }
.me-compte { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 4px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--e-texte); }
.me-compte:hover { background: #fff; }
.me-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--e-doux); color: var(--e-primaire); border: 1px solid var(--e-doux-bord);
  font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.me-compte__nom { display: none; font-weight: 600; font-size: .85rem; }
.me-compte__fleche { display: none; font-size: .8rem; color: var(--e-texte-3); }
.me-menu-compte { min-width: 240px; padding: 8px; border-radius: var(--e-rayon); border: 1px solid var(--e-bord); box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.me-menu-compte__entete { display: grid; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--e-bord); font-size: .85rem; }
.me-menu-compte__entete span { color: var(--e-texte-3); }
.me-menu-compte .dropdown-item { display: flex; align-items: center; gap: 10px; min-height: 44px; border-radius: 8px; font-size: .9rem; }
.me-menu-compte .dropdown-item:hover { background: var(--e-doux); color: var(--e-primaire); }
.me-menu-compte form { margin: 0; }
.me-menu-compte button.dropdown-item { width: 100%; background: none; border: 0; }

/* ------------------------------------------------------------------ Contenu */
.me-principal { min-height: 100vh; display: flex; flex-direction: column; }
.me-etu .me-zone { flex: 1; padding: 20px 16px 32px; overflow-x: clip; }
.me-page { max-width: 1120px; margin: 0 auto; }
.me-pied { padding: 16px; text-align: center; font-size: .8rem; color: var(--e-texte-3); }

.me-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.me-surtitre { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--e-texte-3); font-weight: 600; }
.me-titre { margin: 4px 0 0; font-weight: 800; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.15; }
.me-sous-titre { margin: 4px 0 0; color: var(--e-texte-3); font-size: .9rem; }
.me-entete__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 575.98px) { .me-entete__actions { width: 100%; } .me-entete__actions .me-btn { flex: 1 1 auto; } }

.me-afaire { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; margin-bottom: 20px; border-radius: var(--e-rayon);
  background: var(--e-attention-fond); border: 1px solid #FDE68A; }
.me-afaire__ico { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--e-attention); display: grid; place-items: center; font-size: 1.3rem; }
.me-afaire__corps { flex: 1 1 220px; }
.me-afaire__titre { margin: 0; font-weight: 700; }
.me-afaire__texte { margin: 2px 0 0; color: var(--e-texte-2); font-size: .88rem; }

/* Indicateurs */
.me-kpis { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .me-kpis { grid-template-columns: repeat(3, 1fr); } }
.me-kpi { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--e-carte); border: 1px solid var(--e-bord); border-radius: var(--e-rayon); box-shadow: var(--e-ombre); }
.me-kpi__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; }
.me-kpi__ico--info { background: var(--e-info-fond); color: var(--e-info); }
.me-kpi__ico--succes { background: var(--e-succes-fond); color: var(--e-succes); }
.me-kpi__ico--marque { background: var(--e-doux); color: var(--e-primaire); }
.me-kpi__corps { display: grid; min-width: 0; }
.me-kpi__libelle { font-size: .82rem; color: var(--e-texte-3); font-weight: 500; }
.me-kpi__valeur { font-weight: 600; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.me-kpi__valeur--texte { font-family: var(--e-titres); font-weight: 700; font-size: 1.25rem; line-height: 1.5; overflow-wrap: anywhere; }
.me-kpi__note { font-size: .78rem; color: var(--e-texte-3); }

/* Grille asymétrique */
.me-grille { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 992px) { .me-grille { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.me-grille__side { display: grid; gap: 16px; }
.me-section { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.me-section h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.me-section a { font-weight: 600; font-size: .88rem; color: var(--e-primaire); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.me-section a:hover { text-decoration: underline; }
.me-vide { padding: 32px 20px; text-align: center; color: var(--e-texte-3); background: var(--e-carte); border: 1px dashed var(--e-bord-fort); border-radius: var(--e-rayon); display: grid; gap: 12px; justify-items: center; }
.me-vide .icon { font-size: 2rem; color: var(--e-bord-fort); }
.me-vide p { margin: 0; }

/* Cartes génériques et widgets */
.me-carte { padding: 20px; background: var(--e-carte); border: 1px solid var(--e-bord); border-radius: var(--e-rayon); box-shadow: var(--e-ombre); }
.me-carte h2 { margin: 0 0 4px; font-size: .98rem; font-weight: 700; }
.me-carte__tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.me-carte__tete h2 { margin: 0; }
.me-carte__ico { margin-bottom: 12px; }
.me-carte__texte { margin: 4px 0 16px; color: var(--e-texte-2); font-size: .88rem; }
.me-carte__note { margin: 12px 0 0; color: var(--e-texte-3); font-size: .8rem; }
.me-jauge { height: 6px; border-radius: 99px; background: var(--e-bord); overflow: hidden; }
.me-jauge span { display: block; height: 100%; border-radius: 99px; background: var(--e-primaire); width: 0; }
.me-jauge--25 span { width: 25%; } .me-jauge--50 span { width: 50%; } .me-jauge--75 span { width: 75%; } .me-jauge--100 span { width: 100%; }
.me-coches { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; font-size: .88rem; }
.me-coches li { display: flex; align-items: center; gap: 10px; color: var(--e-texte-2); }
.me-coches .icon { font-size: 1.15rem; color: var(--e-bord-fort); }
.me-coches .is-fait .icon { color: var(--e-succes); }

/* ------------------------------------------------------------------ Carte de suivi d'un dossier */
.me-dossiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 1200px) { .me-dossiers--grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.me-dossier { display: block; padding: 20px; background: var(--e-carte); color: inherit; text-decoration: none; border: 1px solid var(--e-bord);
  border-radius: var(--e-rayon); box-shadow: var(--e-ombre); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.me-dossier:hover { transform: translateY(-2px); border-color: #C4B5FD; box-shadow: var(--e-ombre-haute); color: inherit; }
.me-dossier__tete { display: flex; align-items: flex-start; gap: 12px; }
.me-dossier__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--e-doux); color: var(--e-primaire); display: grid; place-items: center; font-size: 1.3rem; }
.me-dossier__titre { flex: 1; min-width: 0; display: grid; gap: 2px; }
.me-dossier__nom { font-family: var(--e-titres); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.me-dossier__plus { color: var(--e-texte-3); font-weight: 600; }
.me-ref { font-size: .78rem; color: var(--e-texte-3); }
.me-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.me-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.me-badge--succes { background: var(--e-succes-fond); color: var(--e-succes); }
.me-badge--info { background: var(--e-info-fond); color: var(--e-info); }
.me-badge--attention { background: var(--e-attention-fond); color: var(--e-attention); }
.me-badge--neutre { background: #F1F5F9; color: #475569; }
@media (max-width: 479.98px) { .me-dossier__tete { flex-wrap: wrap; } .me-dossier__titre { flex-basis: calc(100% - 60px); } .me-badge { margin-left: 56px; } }

/* Parcours en quatre étapes */
.me-etapes { list-style: none; margin: 22px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.me-etape { position: relative; text-align: center; padding-top: 34px; font-size: .75rem; line-height: 1.3; font-weight: 500; color: var(--e-texte-3); }
.me-etape::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--e-bord); }
.me-etape:first-child::before { display: none; }
.me-etape__rond { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid var(--e-bord-fort); display: grid; place-items: center; font-size: .7rem; font-weight: 600; color: var(--e-texte-3); }
.me-etape.is-fait { color: var(--e-texte-2); }
.me-etape.is-fait::before, .me-etape.is-courante::before { background: var(--e-primaire); }
.me-etape.is-fait .me-etape__rond { background: var(--e-primaire); border-color: var(--e-primaire); color: #fff; }
.me-etape.is-fait .me-etape__rond::before { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.me-etape.is-courante { color: var(--e-primaire); font-weight: 600; }
.me-etape.is-courante .me-etape__rond { border-color: var(--e-primaire); color: var(--e-primaire); box-shadow: 0 0 0 4px rgba(109, 40, 217, .15); animation: me-pulse 2s ease-in-out infinite; }
@keyframes me-pulse { 50% { box-shadow: 0 0 0 7px rgba(109, 40, 217, .06); } }
@media (max-width: 400px) { .me-etape { font-size: .7rem; } }

.me-dossier__suite { display: block; margin-top: 14px; padding: 9px 12px; border-radius: 8px; background: var(--e-fond); font-size: .84rem; color: var(--e-texte-2); }
.me-dossier__suite strong { color: var(--e-texte); font-weight: 600; }
.me-dossier__suite--alerte { background: var(--e-attention-fond); color: var(--e-attention); }
.me-dossier__suite--alerte strong { color: var(--e-attention); }
.me-dossier__pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--e-bord); font-size: .82rem; color: var(--e-texte-3); }
.me-dossier__meta { display: inline-flex; align-items: center; gap: 6px; }
.me-dossier__lien { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--e-primaire); font-weight: 600; }
.me-dossier__lien .icon { transition: transform .2s; }
.me-dossier:hover .me-dossier__lien .icon { transform: translateX(4px); }

.me-repli { margin-top: 24px; }
.me-repli > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 12px; font-weight: 600; cursor: pointer; }
.me-repli__note { padding: 1px 8px; border-radius: 99px; background: #F1F5F9; color: var(--e-texte-2); font-size: .78rem; }

/* ------------------------------------------------------------------ Pages intérieures (cartes gx-* de Scolarix) alignées sur la coque */
.me-etu .gx-card, .me-etu .gx-list { border-radius: var(--e-rayon); border: 1px solid var(--e-bord); box-shadow: var(--e-ombre); background: #fff; }
.me-etu .gx-title { font-family: var(--e-titres); font-weight: 800; letter-spacing: -.02em; }
.me-etu .btn-primary { background: var(--e-primaire); border-color: var(--e-primaire); font-weight: 600; border-radius: 10px; }
.me-etu .btn-primary:hover, .me-etu .btn-primary:focus-visible { background: var(--e-primaire-fonce); border-color: var(--e-primaire-fonce); }
.me-etu .btn-outline-primary { border-radius: 10px; font-weight: 600; }

/* ------------------------------------------------------------------ Grand écran : barre latérale fixe */
@media (min-width: 992px) {
  .me-side { transform: none; visibility: visible; box-shadow: none; width: var(--e-lateral); }
  .me-voile, .me-voile[hidden] { display: none; }
  .me-side__fermer, .me-haut__burger { display: none; }
  .me-principal { margin-left: var(--e-lateral); }
  .me-fil { display: flex; }
  .me-haut { padding: 0 32px; }
  .me-etu .me-zone { padding: 32px; }
  .me-compte__nom, .me-compte__fleche { display: inline; }
}
@media (min-width: 576px) and (max-width: 991.98px) { .me-fil { display: flex; } }
@media (prefers-reduced-motion: reduce) { .me-etu *, .me-etu *::before { animation: none !important; transition: none !important; } }

.me-page a:not([class]) { color: var(--e-primaire-fonce); }
.me-cloche .gx-badge { position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #DC2626; color: #fff;
  font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.me-carte--suivi { margin-bottom: 16px; padding-top: 4px; padding-bottom: 8px; }

/* ------------------------------------------------------------------ Menus groupés (agent, administrateur) */
.me-menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; margin: 0 -16px; padding: 0 16px 12px; }
.me-menu__groupe { margin: 18px 12px 6px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--e-texte-3); }
.me-menu__groupe:first-child { margin-top: 2px; }
.me-menu__lien--off { color: var(--e-texte-3); cursor: not-allowed; }
.me-menu__lien--off:hover { background: transparent; color: var(--e-texte-3); }
.me-menu__bientot { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: #F1F5F9; color: var(--e-texte-3); font-size: .72rem; font-weight: 600; }
.me-role { padding: 4px 10px; border-radius: 99px; background: var(--e-doux); border: 1px solid var(--e-doux-bord); color: var(--e-primaire-fonce); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
