/* ==========================================================================
   VITRINE (vitrine.css) — CSS DE PRODUCTION de la page d'accueil (index.html).
   Ex « vitrine-mockups.css » : renommé pour ne plus faire croire à un brouillon jetable.
   Maquettes d'écrans (device frame + aperçus de l'app)
   Partagé par les versions de la page d'accueil : le cadre navigateur et les
   5 maquettes (exercice interactif, page élève, progression, banque, PDF).
   S'appuie sur les variables --c1/--c2/--c3/--gradient… définies par la page.
   ========================================================================== */

/* Coupe l'habillage natif des boutons de maquette : Safari 26 dessinait son
   bouton natif derrière ceux dont le fond est un dégradé (rectangle fantôme). */
.aem-ok-btn { appearance: none; -webkit-appearance: none; }

/* =========================================================
   DEVICE FRAME (browser mockup)
   ========================================================= */
.device__browser {
  background: white;
  border-radius: var(--r-lg, 24px);
  box-shadow: var(--shadow-xl, 0 28px 72px rgba(0,0,0,0.18));
  overflow: hidden;
  border: 1px solid var(--border, rgba(255,255,255,0.75));
}
.device__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}
.device__dot { width: 10px; height: 10px; border-radius: 50%; }
.device__dot--r { background: #fc5c65; }
.device__dot--y { background: #ffd32a; }
.device__dot--g { background: #0be881; }
.device__url {
  flex: 1; background: white; border-radius: 5px;
  padding: 3px 10px; font-size: 0.75rem; color: var(--text-muted, #6b7280);
  font-family: monospace;
}

/* =========================================================
   MOCKUP — PAGE ÉLÈVE
   → Remplacée par un APERÇU RÉEL : index.html intègre /eleve-demo.html
     dans un <iframe> (mêmes CSS que l'app). Plus aucun style ici.
   ========================================================= */

/* =========================================================
   MOCKUP — TABLEAU DE PROGRESSION
   ========================================================= */
/* Design enseignant : verre clair sur fond sable + halos */
.app-teacher {
  background:
    radial-gradient(80% 60% at 85% 0%, color-mix(in srgb, var(--c1) 20%, transparent), transparent 65%),
    radial-gradient(60% 50% at 8% 35%, rgba(252,211,77,0.16), transparent 65%),
    #FBF8F4;
}
.app-teacher__tabs {
  display: flex; gap: 4px; padding: 10px 12px 4px;
  background: transparent;
}
.app-tab {
  padding: 7px 13px; font-size: 0.68rem; font-weight: 600;
  color: #57534E; border-radius: 8px; cursor: default;
  background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8);
}
.app-tab--on {
  background: var(--gradient); color: white; border-color: transparent;
  box-shadow: 0 3px 10px var(--glow-1);
}
.app-teacher__body { padding: 10px 12px; }
.app-actions-bar {
  display: flex; gap: 6px; margin-bottom: 9px; flex-wrap: wrap;
}
.app-select {
  background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.85);
  border-radius: 7px; padding: 4px 9px;
  font-size: 0.6rem; color: #57534E; font-family: 'Poppins', sans-serif;
  cursor: default; white-space: nowrap;
}
.app-btn-sm {
  background: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.9);
  border-radius: 7px; padding: 4px 10px;
  font-size: 0.6rem; color: #57534E; font-weight: 600;
  font-family: 'Poppins', sans-serif; cursor: default; white-space: nowrap;
}
.prog-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 0.59rem;
}
.prog-table th {
  background: rgba(255,255,255,0.55); color: #A8A29E;
  padding: 5px 8px; text-align: center; font-weight: 600;
}
.prog-table th:first-child { text-align: left; border-radius: 5px 0 0 0; }
.prog-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 3px; vertical-align: middle; flex-shrink: 0;
}
.prog-table td {
  padding: 5px 8px; text-align: center; color: #1C1917;
  border-bottom: 1px solid rgba(255,255,255,0.65);
}
.prog-table td:first-child { text-align: left; font-weight: 600; }
.prog-table tr:nth-child(even) td { background: rgba(255,255,255,0.3); }
/* --- Pill de score (même visuel que le vrai site) --- */
.score-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,0.92); border-radius: 20px;
  padding: 2px 7px; font-size: 0.56rem; font-weight: 700;
  white-space: nowrap; line-height: 1;
}
.ssp-ok  { color: #22c55e; }
.ssp-bad { color: #ef4444; }
.ssp-tot { color: #9ca3af; }
.ssp-sep { color: #d1d5db; font-weight: 300; font-size: 0.45rem; line-height: 1; }

/* =========================================================
   MOCKUP — RECHERCHE D'EXERCICES (onglet enseignant, thème solaire :
   fond crème, barre de recherche, degrés + compteurs, cartes en verre clair)
   ========================================================= */
.app-rech {
  background:
    radial-gradient(80% 60% at 85% 0%, color-mix(in srgb, var(--c1) 20%, transparent), transparent 65%),
    radial-gradient(60% 50% at 8% 80%, rgba(252,211,77,0.16), transparent 65%),
    #FBF8F4;
  padding: 12px;
}
.app-rech__search {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.62); border: 1px solid rgba(255,255,255,0.85);
  border-radius: 10px; padding: 8px 11px; margin-bottom: 11px;
  font-size: 0.68rem; color: #A8A29E;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.app-rech__search svg { width: 13px; height: 13px; flex-shrink: 0; }
.app-rech__layout { display: flex; gap: 12px; align-items: flex-start; }

/* Sidebar : degrés (avec nombre d'exercices) + matières du degré ouvert */
.app-rech__side {
  width: 150px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.rech-nav {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; border-radius: 9px; cursor: default; color: #57534E;
}
.rech-nav--deg { font-size: 0.74rem; font-weight: 700; color: #1C1917; }
.rech-nav--sub { font-size: 0.66rem; font-weight: 600; }
.rech-nav--active { background: var(--so-accent-soft); color: var(--so-accent-deep); }
.rech-nav-children {
  margin-left: 8px; padding-left: 9px;
  border-left: 2px solid var(--hairline);
  display: flex; flex-direction: column; gap: 1px; margin-bottom: 2px;
}
.rech-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* Compteur = nombre d'exercices disponibles (chiffres bien lisibles) */
.rech-count { margin-left: auto; font-weight: 800; color: var(--so-accent-deep); flex-shrink: 0; }
.rech-nav--deg .rech-count { font-size: 0.92rem; }
.rech-nav--sub .rech-count { font-size: 0.72rem; opacity: 0.85; }

/* Zone principale : sections par matière + grille de cartes */
.app-rech__main { flex: 1; min-width: 0; }
.rech-section-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #78716C; margin: 4px 0 7px;
}
.rech-section-label:first-child { margin-top: 0; }
.rech-section-count { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.7; }
.rech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 11px; }
.rech-pill {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.52); border: 1px solid rgba(255,255,255,0.8);
  border-radius: 12px; padding: 9px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 3px 8px rgba(0,0,0,0.04);
}
.rech-pill__emoji { font-size: 1.3rem; line-height: 1; margin-bottom: 5px; }
.rech-pill__name {
  font-size: 0.63rem; font-weight: 600; color: #1C1917; line-height: 1.3; margin-bottom: 3px;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(28,25,23,0.18);
}
.rech-pill__desc { font-size: 0.55rem; color: #78716C; line-height: 1.35; margin-bottom: 6px; }
.rech-pill__meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: auto; margin-bottom: 6px; }
.rech-lvl { font-size: 0.52rem; padding: 1px 7px; border-radius: 20px; font-weight: 700; }
.rech-lvl--facile { background: #ECFDF5; color: #15803D; }
.rech-lvl--diff   { background: #FEF2F2; color: #B91C1C; }
.rech-pill__scope { font-size: 0.5rem; color: #A8A29E; }
/* Boutons d'action (masquer / imprimer / modifier), comme .ex-pill__action-btn */
.rech-pill__actions { display: flex; gap: 4px; }
.rech-actbtn {
  width: 22px; height: 22px; border-radius: 6px;
  background: #fff; border: 1px solid #DFD8CD; color: #57534E;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; line-height: 1;
}

/* =========================================================
   MOCKUP — COMPTABILITÉ DE CLASSE (onglet Compta, thème solaire :
   tuiles de résumé + carte « soldes par catégorie »)
   ========================================================= */
.app-compta {
  background:
    radial-gradient(80% 60% at 85% 0%, color-mix(in srgb, var(--c1) 20%, transparent), transparent 65%),
    radial-gradient(60% 50% at 8% 80%, rgba(252,211,77,0.16), transparent 65%),
    #FBF8F4;
  padding: 14px; min-height: 290px;
  font-variant-numeric: tabular-nums;
}
/* Tuiles de résumé (filet fin entre les tuiles, comme compta.css) */
.acmp-tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: #ECE8E1; border: 1px solid #ECE8E1;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(20,40,30,.07);
  margin-bottom: 14px;
}
.acmp-tile { background: #fff; padding: 13px 14px; }
.acmp-tile--lead { grid-column: 1 / -1; background: var(--gradient); }
.acmp-lab {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.62rem; font-weight: 600; color: #78716C;
}
.acmp-tile--lead .acmp-lab { color: rgba(255,255,255,0.85); }
.acmp-val { font-size: 1.1rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; color: #1C1917; }
.acmp-tile--lead .acmp-val { color: #fff; font-size: 1.5rem; }
.acmp-unit { font-size: 0.6rem; font-weight: 600; margin-left: 4px; opacity: 0.85; }
.acmp-val--pos { color: #15803D; }
.acmp-val--neg { color: #C13A2B; }
.acmp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.acmp-dot--g { background: #15803D; }
.acmp-dot--r { background: #C13A2B; }

/* Carte « Soldes par catégorie » */
.acmp-card {
  background: #fff; border: 1px solid #ECE8E1;
  border-radius: 16px; box-shadow: 0 6px 22px rgba(20,40,30,.07);
  padding: 14px;
}
.acmp-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.acmp-eyebrow { font-size: 0.56rem; letter-spacing: .14em; text-transform: uppercase; color: #A8A29E; font-weight: 700; }
.acmp-card-title { font-size: 0.82rem; font-weight: 700; color: #1C1917; }
.acmp-cat {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 9px 2px; border-bottom: 1px solid #ECE8E1;
}
.acmp-cat:last-child { border-bottom: none; padding-bottom: 2px; }
.acmp-cat__name { font-size: 0.68rem; font-weight: 700; color: #1C1917; }
.acmp-cat__val  { font-size: 0.74rem; font-weight: 800; }

/* =========================================================
   MOCKUP — EXERCICE INTERACTIF (template-foot.html)
   ========================================================= */
.aem-wrap { display: flex; flex-direction: column; background: #f0f2ff; }

/* Barre modale (couleurs app) */
.aem-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: var(--gradient-app); gap: 8px;
}
.aem-bar-title {
  flex: 1; color: white; font-size: 0.7rem; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3); text-align: center;
}
.aem-bar-btns { display: flex; gap: 5px; }
.aem-bar-btn {
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.28);
  border-radius: 6px; padding: 3px 8px; color: white;
  font-size: 0.6rem; font-weight: 600; font-family: 'Poppins', sans-serif; cursor: default;
}

/* Corps de l'exercice */
.aem-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 7px; }

/* Barre de progression */
.aem-prog-row { display: flex; align-items: center; gap: 7px; }
.aem-prog-track { flex: 1; height: 8px; background: var(--gradient-soft); border-radius: 20px; overflow: hidden; }
.aem-prog-fill  { height: 100%; background: var(--gradient); border-radius: 20px; }
.aem-prog-lbl   { font-size: 0.58rem; font-weight: 700; color: var(--c2); white-space: nowrap; }

/* Score pills */
.aem-pills { display: flex; gap: 5px; }
.aem-pill  { flex: 1; border-radius: 9px; padding: 4px 3px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.aem-pill-icon { font-size: 0.82rem; }
.aem-pill-num  { font-size: 0.9rem; font-weight: 800; line-height: 1.1; }
.aem-pill-ok  { background: #f0fdf4; color: #15803d; }
.aem-pill-bad { background: #fff5f5; color: #b91c1c; }
.aem-pill-str { background: #fffbeb; color: #b45309; }

/* Zone football */
.aem-football {
  background: white; border-radius: 11px;
  padding: 6px 8px 4px; box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.aem-fb-score {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-bottom: 4px;
  font-size: 0.55rem; font-weight: 700; color: #64748b;
}
.aem-fb-num { font-size: 0.9rem; font-weight: 800; color: #1e293b; }
.aem-fb-sep { color: #cbd5e1; font-weight: 700; }
.aem-pitch {
  position: relative;
  background: linear-gradient(170deg, #22c55e 0%, #16a34a 100%);
  border-radius: 7px; height: 54px; overflow: hidden;
}
.aem-pitch::before {
  content: ''; position: absolute; inset: 0; border-radius: 7px;
  background: repeating-linear-gradient(90deg, transparent 0px, transparent 18px, rgba(0,0,0,0.05) 18px, rgba(0,0,0,0.05) 36px);
}
.aem-center-line {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1.5px; background: rgba(255,255,255,0.38); transform: translateX(-50%);
}
.aem-center-circle {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 22px; height: 22px; border: 1.5px solid rgba(255,255,255,0.38); border-radius: 50%;
}
.aem-goal { position: absolute; top: 50%; transform: translateY(-50%); width: 11px; height: 26px; z-index: 2; }
.aem-goal-body { width: 100%; height: 100%; background: rgba(255,255,255,0.18); border: 2px solid white; }
.aem-goal-l { left: 0; }
.aem-goal-l .aem-goal-body { border-left: none; border-radius: 0 4px 4px 0; }
.aem-goal-r { right: 0; }
.aem-goal-r .aem-goal-body { border-right: none; border-radius: 4px 0 0 4px; }
.aem-ball {
  position: absolute; font-size: 13px; line-height: 1; z-index: 5;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
  transform: translate(-50%,-50%);
}
.aem-fb-msg { font-size: 0.55rem; font-weight: 700; text-align: center; margin-top: 3px; min-height: 13px; }

/* Carte de question */
.aem-card {
  background: white; border-radius: 13px; padding: 10px 11px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}
.aem-instr {
  font-size: 0.52rem; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.aem-question {
  font-size: 0.82rem; font-weight: 700; color: #1e293b;
  line-height: 1.5; margin-bottom: 8px;
}
.aem-input-row { display: flex; align-items: center; gap: 7px; }
.aem-input-fake {
  flex: 1; border: 2.5px solid var(--c1); border-radius: 9px;
  padding: 7px 10px; background: white;
  display: flex; align-items: center;
}
.aem-input-typed { font-size: 0.85rem; font-weight: 700; color: #1e293b; font-family: 'Poppins', sans-serif; }
.aem-cursor {
  color: var(--c1); font-weight: 300; margin-left: 1px;
  animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor { 0%,100%{opacity:1} 50%{opacity:0} }
.aem-ok-btn {
  background: var(--gradient); color: white; border: none; border-radius: 9px;
  padding: 7px 13px; font-size: 0.75rem; font-weight: 700;
  font-family: 'Poppins', sans-serif; cursor: default;
  box-shadow: 0 2px 8px var(--glow-1); flex-shrink: 0;
}
