/* ==========================================================================
   DESIGN 2026 — style « produit de la Silicon Valley » (sobre, net, aéré).
   Chargé EN DERNIER : il affine les couleurs, la typographie (Inter) et l'aspect
   des composants (bordures fines, ombres douces, pas de majuscules forcées).
   Pour revenir au style précédent : retirer ce fichier de index.html.
   ========================================================================== */

/* ---------------------------------------------------------------- Couleurs & typo */
:root {
  --font: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Bleu du logo Stras'Cours (#6C5CE7), poussé vers un bleu électrique « startup » */
  --brand-50:  #e8f7fd;
  --brand-100: #cdeefb;
  --brand-200: #97daf5;
  --brand-500: #8B7CF0;
  --brand-600: #6C5CE7;
  --brand-700: #4E3FCB;
  --brand-shadow: #4E3FCB;
  --accent-2:  #2563eb;
  --anthracite: #1f2329;
  --grad-brand: linear-gradient(135deg, #A78BFA 0%, #6C5CE7 45%, #2563eb 100%);
  --grad-soft:  linear-gradient(135deg, rgba(108, 92, 231, .08), rgba(37, 99, 235, .05));

  --bg:        #f7f7f9;
  --surface:   #ffffff;
  --surface-2: #f4f4f7;
  --surface-3: #ebebf0;
  --border:    #e7e7ec;
  --border-2:  #d6d6de;

  --text:   #16191f;
  --text-2: #4f5562;
  --text-3: #8a909c;

  --success: #16a34a; --success-bg: #ecfdf3;
  --warning: #c2730a; --warning-bg: #fff7e8;
  --danger:  #dc2626; --danger-bg:  #fef1f1;
  --info:    #6C5CE7; --info-bg:    #e8f7fd;

  --r-xs: 8px; --r-sm: 10px; --r-md: 12px; --r-lg: 14px; --r-xl: 16px;
  --shadow-xs: 0 1px 1px rgba(17, 17, 24, .03);
  --shadow-sm: 0 1px 2px rgba(17, 17, 24, .05), 0 0 0 1px rgba(17, 17, 24, .02);
  --shadow-md: 0 8px 24px -8px rgba(17, 17, 24, .12), 0 2px 6px -2px rgba(17, 17, 24, .05);
  --shadow-lg: 0 30px 70px -20px rgba(17, 17, 24, .30), 0 10px 24px -10px rgba(17, 17, 24, .12);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand-600) 22%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b10; --surface: #131319; --surface-2: #1a1a22; --surface-3: #23232d; --border: #24242e; --border-2: #33333f;
    --text: #ededf3; --text-2: #a8a8ba; --text-3: #707084;
    --brand-50: #0b2a3a; --brand-100: #0e3a50; --brand-200: #125070; --brand-500: #4cc4f2; --brand-600: #2bb5ee; --brand-700: #13a0dc;
    --success-bg: rgba(34, 197, 94, .12); --warning-bg: rgba(245, 158, 11, .12); --danger-bg: rgba(239, 68, 68, .12); --info-bg: rgba(43, 181, 238, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b10; --surface: #131319; --surface-2: #1a1a22; --surface-3: #23232d; --border: #24242e; --border-2: #33333f;
  --text: #ededf3; --text-2: #a8a8ba; --text-3: #707084;
  --brand-50: #0b2a3a; --brand-100: #0e3a50; --brand-200: #125070; --brand-500: #4cc4f2; --brand-600: #2bb5ee; --brand-700: #13a0dc;
  --success-bg: rgba(34, 197, 94, .12); --warning-bg: rgba(245, 158, 11, .12); --danger-bg: rgba(239, 68, 68, .12); --info-bg: rgba(43, 181, 238, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .6);
}

body { font-family: var(--font); font-weight: 450; letter-spacing: -.006em; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; background: var(--bg); }
h1, h2, h3, .page-head h1, .card__title, .modal__title { font-weight: 650; letter-spacing: -.022em; }
b, strong { font-weight: 600; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--text-2); }
.section-title { font-weight: 650; font-size: 15px; letter-spacing: -.01em; margin-top: 26px; }
.section-title::after { height: 1px; background: var(--border); }
.muted, .cell-sub { color: var(--text-3); }

/* ---------------------------------------------------------------- Boutons */
.btn {
  border: 1px solid var(--border-2); border-bottom-width: 1px; border-radius: 10px; min-height: 38px; padding: 0 14px;
  font-weight: 560; font-size: 13.5px; letter-spacing: -.005em; text-transform: none;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn:active { transform: scale(.98); border-bottom-width: 1px; margin-bottom: 0; }
.btn:focus-visible { box-shadow: var(--ring); outline: none; }
.btn--sm { min-height: 32px; border-radius: 8px; padding: 0 11px; font-size: 13px; border-bottom-width: 1px; }
.btn--sm:active { border-bottom-width: 1px; }
.btn--lg { min-height: 46px; border-radius: 12px; font-size: 15px; }
.btn--primary {
  background: var(--brand-600); border-color: var(--brand-600); color: #fff; text-transform: none; letter-spacing: -.005em; font-size: 13.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(17, 17, 24, .12);
}
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn--sm.btn--primary { font-size: 13px; }
.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--success:hover { background: #15803d; border-color: #15803d; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn--solid-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.icon-btn { border-radius: 9px; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- Cartes, champs, tableaux */
.card, .kpi, .stat, .modal, .toast, details.more, .welcome, .day-card, .quick__tile, .tile, .leader__row, .pill-stat, .tache, .taches, .lc, .bib-carte, .esp-rac, .el-tuile, .courrier__modele, .assist__btn {
  border-width: 1px;
}
.card { border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.card__head { border-bottom: 1px solid var(--border); padding: 14px 20px; }
.card__title { font-size: 15px; }
.input, .select, .textarea {
  border: 1px solid var(--border-2); background: var(--surface); border-radius: 10px; font-weight: 450; min-height: 38px;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--text-3) 50%, var(--border-2)); }
.input:focus, .select:focus, .textarea:focus { background: var(--surface); border-color: var(--brand-600); box-shadow: var(--ring); }
.field__label { font-weight: 560; font-size: 13px; color: var(--text-2); }
.form-section { font-weight: 600; letter-spacing: .02em; }
.badge { font-weight: 560; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.chip { border: 1px solid var(--border-2); font-weight: 520; font-size: 13px; background: var(--surface); border-radius: 999px; }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip[aria-pressed="true"] b { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }
.table th { background: transparent; border-bottom: 1px solid var(--border); font-weight: 560; font-size: 12px; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.table td { border-bottom: 1px solid var(--border); }
.table tbody tr:hover td { background: var(--surface-2); }
.kpi { border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.modal { border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal__icon { background: var(--brand-50); color: var(--brand-600); box-shadow: none; border-radius: 12px; }
.modal__foot { border-top: 1px solid var(--border); }
.modal-overlay, .overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.toast { border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-md); }
.alert { border-radius: 12px; }
.progress { height: 6px; border-radius: 99px; }

/* ---------------------------------------------------------------- Menu latéral */
.sidebar { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); border-right: 1px solid var(--border); }
.sidebar__brand strong { font-weight: 700; letter-spacing: -.02em; }
.brand-mark { background: var(--grad-brand); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand-600) 70%, transparent); border-radius: 10px; }
.nav-group { margin-bottom: 10px; }
.nav-group__label { font-weight: 560; font-size: 11.5px; letter-spacing: .02em; text-transform: none; color: var(--text-3); padding-left: 10px; }
.nav-link { color: var(--text-2); font-weight: 520; font-size: 14px; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; gap: 10px; }
.nav-link .i { width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: transparent; color: var(--text-3); }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:hover .i { color: var(--text-2); }
.nav-link[aria-current="page"] { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.nav-link[aria-current="page"] .i { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.nav-link__badge { background: var(--danger); font-weight: 600; }
.nav-group--principal { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.nav-group--principal .nav-link { font-size: 14.5px; padding: 7px 10px; }
.nav-plus { margin-bottom: 12px; }
.nav-plus__btn { list-style: none; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; color: var(--text-2); font-weight: 520; font-size: 14px; flex-wrap: wrap; }
.nav-plus__btn::-webkit-details-marker { display: none; }
.nav-plus__btn:hover { background: var(--surface-2); color: var(--text); }
.nav-plus__btn > .i:first-child { width: 28px; height: 28px; padding: 6px; color: var(--text-3); }
.nav-plus__btn > span { flex: 1; }
.nav-plus__btn > small { order: 3; width: 100%; padding-left: 38px; margin-top: -4px; font-size: 11.5px; color: var(--text-3); font-weight: 450; }
.nav-plus__btn > .i:last-child { width: 16px; height: 16px; color: var(--text-3); transition: transform .2s; }
.nav-plus[open] > .nav-plus__btn > .i:last-child { transform: rotate(180deg); }
.nav-plus[open] > .nav-plus__btn > small { display: none; }
.nav-plus > .nav-group { margin-top: 6px; }
.sidebar__user { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); border-radius: 12px; }
.online-strip { border-width: 1px; border-radius: 12px; }

.topbar { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.search-trigger, .sync { border-width: 1px; border-radius: 10px; }
@media (max-width: 960px) {
  .bottom-nav { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .bottom-nav__item { font-weight: 560; }
  .fab { background: var(--grad-brand); box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--brand-600) 70%, transparent); border-radius: 18px; }
}

/* ---------------------------------------------------------------- Accueil & tuiles */
.welcome {
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand-600) 10%, transparent) 0%, transparent 55%), radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, #2563eb 8%, transparent) 0%, transparent 50%), var(--surface);
}
.welcome h1 { font-weight: 700; letter-spacing: -.03em; }
.pill-stat { border: 1px solid var(--border); border-radius: 12px; font-weight: 650; font-size: 16px; }
.pill-stat small { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; }
.stat { border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.stat__label { text-transform: none; letter-spacing: 0; font-weight: 520; font-size: 13px; color: var(--text-3); }
.stat__value { font-weight: 650; letter-spacing: -.03em; }
.day-card { border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); }
.tile, .quick__tile { border: 1px solid var(--border); border-bottom-width: 1px; border-radius: 14px; box-shadow: var(--shadow-xs); }
.tile:hover:not(:disabled), .quick__tile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tile:active:not(:disabled), .quick__tile:active { transform: scale(.99); border-bottom-width: 1px; margin-bottom: 0; }
.tile b, .quick__tile b { font-weight: 600; }
.leader__row { border: 1px solid var(--border); border-radius: 14px; }
details.more { border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }
details.more > summary { font-weight: 600; font-size: 14.5px; }
.taches { border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); background: var(--surface); }
.tache { border-radius: 12px; }
.taches__plus > summary { cursor: pointer; padding: 10px 14px; font-weight: 560; font-size: 13.5px; color: var(--brand-600); list-style: none; }
.taches__plus > summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------- Onglets (Mails, fiche élève) */
.onglets { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { flex: none; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 520; color: var(--text-2); padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.onglet:hover { color: var(--text); }
.onglet[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- Mails */
.courrier__nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 600; }
.courrier__sous { margin-bottom: 14px; }
.courrier__embed .page-head h1 { font-size: 19px; }
.courrier__embed .page-head { margin-bottom: 12px; }
.courrier__intro { color: var(--text-2); margin: 0 0 14px; }
.courrier__modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.courrier__modele { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--text); padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); cursor: pointer; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s, border-color .15s; }
.courrier__modele:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--brand-200); }
.courrier__emoji { font-size: 26px; line-height: 1; }
.courrier__modele b { font-size: 15px; font-weight: 600; }
.courrier__modele small { color: var(--text-3); font-size: 13px; line-height: 1.45; }
.courrier__recherche { margin-bottom: 12px; max-width: 420px; }
.courrier__hist { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.courrier__hist:last-child { border-bottom: 0; }
.courrier__hist .grow { min-width: 0; display: flex; flex-direction: column; }
.courrier__hist .grow b { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.courrier__hist small { color: var(--text-3); }
.courrier__hist-date { display: flex; flex-direction: column; align-items: center; min-width: 46px; font-size: 11px; color: var(--text-3); text-transform: uppercase; }
.courrier__hist-date b { font-size: 18px; color: var(--text); line-height: 1.1; }
.courrier__hist-date small { text-transform: none; }

/* ---------------------------------------------------------------- Assistants (Accueil) */
.assist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .assist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.assist__btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; font: inherit; color: var(--text); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); cursor: pointer; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s, border-color .15s; }
.assist__btn:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--brand-200); }
.assist__emoji { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; border-radius: 12px; background: var(--brand-50); margin-bottom: 6px; }
.assist__btn b { font-weight: 600; font-size: 14.5px; }
.assist__btn small { color: var(--text-3); font-size: 12.5px; }

/* ---------------------------------------------------------------- Résumé Finances (Accueil) */
.fin-resume { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); padding: 14px 16px 16px; margin-bottom: 22px; }
.fin-resume__tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fin-resume__tete b { font-weight: 650; }
.fin-resume__tete .link-more { margin-left: auto; }
.fin-resume__obj { font-size: 13px; color: var(--text-2); padding: 2px 10px; border-radius: 99px; background: var(--brand-50); }
.fin-resume__ligne { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .fin-resume__ligne { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fin-resume__item { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: background .15s, border-color .15s; }
.fin-resume__item:hover { background: var(--surface); border-color: var(--border-2); }
.fin-resume__item small { color: var(--text-3); font-size: 12.5px; }
.fin-resume__item b { font-size: 20px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fin-resume__item em { font-style: normal; font-size: 12px; color: var(--text-3); }
.fin-resume__item.is-att { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }

/* ---------------------------------------------------------------- Fiche élève */
.el-retour { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13.5px; text-decoration: none; margin-bottom: 10px; }
.el-retour:hover { color: var(--text); }
.el-retour .i { width: 16px; height: 16px; }
.el-tete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand-600) 9%, transparent) 0%, transparent 55%), var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.el-tete .avatar--lg { width: 60px; height: 60px; font-size: 21px; border-radius: 18px; }
.el-tete .grow { min-width: 200px; }
.el-tete h1 { font-size: 24px; margin: 0; letter-spacing: -.03em; }
.el-tete p { margin: 4px 0 0; color: var(--text-2); }
.el-boutons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.el-etat { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 14px; }
.el-etat__emoji { font-size: 28px; }
.el-etat .grow { display: flex; flex-direction: column; min-width: 160px; }
.el-etat small { color: var(--text-3); font-size: 12.5px; }
.el-etat b { font-size: 16px; font-weight: 600; }
.el-etat__barre { flex: 1 1 320px; }
.el-etat--success { background: var(--success-bg); }
.el-etat--danger { background: var(--danger-bg); }
.el-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.el-tuile { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s; }
.el-tuile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.el-tuile > span { font-size: 20px; }
.el-tuile small { color: var(--text-3); font-size: 12.5px; }
.el-tuile b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.el-tuile em { font-style: normal; font-size: 12px; color: var(--text-3); }
.el-tuile--ok { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.el-tuile--ok b { color: var(--success); }
.el-tuile--att { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); }
.el-tuile--ko b { color: var(--danger); }
.el-grille2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-bottom: 14px; }
.el-h { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.el-info { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.el-info:last-child { border-bottom: 0; }
.el-info span { color: var(--text-3); flex: none; }
.el-info b { font-weight: 520; text-align: right; overflow-wrap: anywhere; }
.el-ligne { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 11px 18px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; color: var(--text); text-align: left; }
button.el-ligne { cursor: pointer; }
button.el-ligne:hover { background: var(--surface-2); }
.el-ligne:last-child { border-bottom: 0; }
.el-ligne b { font-weight: 520; }
.el-ligne small { color: var(--text-3); }
.el-cma-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.el-cma-tete .grow { display: flex; flex-direction: column; }
.el-cma-tete small { color: var(--text-3); }
.el-pieces { display: grid; gap: 6px; }
.el-piece { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.el-piece .grow { display: flex; flex-direction: column; min-width: 0; }
.el-piece small { color: var(--text-3); font-size: 12.5px; }
.el-demarrage { margin-top: 12px; }
.el-demarrage .card__body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.el-demarrage .grow { display: flex; flex-direction: column; min-width: 220px; flex: 1; }
.el-demarrage small { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.el-progress { margin: 12px 0 0; }
.el-actions-ligne { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.el-prog { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.el-prog .progress { flex: 1; }
.el-paie { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.el-paie:last-child { border-bottom: 0; }
.el-paie .grow { display: flex; flex-direction: column; gap: 4px; }
.el-paie small { color: var(--text-3); }
.el-note { display: flex; gap: 8px; flex-wrap: wrap; }
.el-note .select { width: auto; }
.el-note .input { flex: 1; min-width: 200px; }
.lien-fiche { color: inherit; text-decoration: none; display: block; }
.lien-fiche:hover .person__name, .lien-fiche:hover b { color: var(--brand-600); text-decoration: underline; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Actions du jour : fond blanc, couleur d'urgence en liseré à gauche (plus calme) */
.tache { background: var(--surface) !important; border: 1px solid var(--border) !important; border-left: 3px solid var(--border-2) !important; box-shadow: none; }
.tache.is-urgent { border-left-color: var(--danger) !important; }
.tache.is-important { border-left-color: #f59e0b !important; }
.tache.is-afaire { border-left-color: var(--brand-600) !important; }
.tache b { font-weight: 600; }
.tache .btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.tache .btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.taches__pastille { font-weight: 560; border-radius: 999px; }
.day-card__top h2 { font-weight: 650; letter-spacing: -.02em; }
.day-card__top h2 small { font-weight: 500; }
.dash-relances { border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }

/* Bandeaux de rappel en haut des pages : carte sobre avec liseré coloré */
.reminder { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-left: 3px solid var(--warning) !important; border-radius: 14px !important; box-shadow: var(--shadow-sm) !important; padding: 12px 14px !important; }
.reminder b { text-transform: none !important; letter-spacing: -.01em !important; font-weight: 600 !important; font-size: 14.5px !important; color: var(--text) !important; }
.reminder p { color: var(--text-2) !important; opacity: 1 !important; }
.reminder__icon { background: var(--warning-bg) !important; color: var(--warning) !important; box-shadow: none !important; border-radius: 10px !important; }
.reminder--echec { border-left-color: var(--danger) !important; }
.reminder--echec .reminder__icon { background: var(--danger-bg) !important; color: var(--danger) !important; }
.reminder .btn--white { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); }
.reminder .btn--white:hover { background: var(--surface-2); }
.reminder .icon-btn { color: var(--text-3) !important; }
.table--cards td::before { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.stat.fin-stat { background: var(--surface) !important; border-color: var(--border) !important; }
.stat.fin-stat--att { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)) !important; }
.stat.fin-stat--ko { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)) !important; }
.fin-stat__voir { color: var(--brand-600); font-weight: 560; }
.objectif--vide { border: 1px dashed var(--border-2) !important; background: var(--surface) !important; border-radius: 16px !important; }
.fin-ok { border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); border-radius: 12px; font-weight: 520; }
.fin-regle { border-radius: 14px; }


/* ==========================================================================
   FINITIONS — animations douces, connexion, pages vides, jeu discret, thème sombre
   ========================================================================== */

/* ---- Animations douces ---- */
@keyframes sc-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sc-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
#page > div { animation: sc-page-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.modal { animation: sc-pop .22s cubic-bezier(.2, .8, .2, 1) both; }
.modal-overlay, .overlay { animation: sc-fade .18s ease both; }
.toast { animation: sc-pop .25s cubic-bezier(.2, .8, .2, 1) both; }
.menu, .dropdown { animation: sc-pop .14s ease both; }
.card, .stat, .el-tuile, .assist__btn, .courrier__modele, .fin-resume__item, .nav-link, .chip, .onglet { transition: background .18s, border-color .18s, box-shadow .2s, transform .2s, color .18s; }
.nav-link[aria-current="page"] .i { transition: background .2s, color .2s; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%); background-size: 300% 100%; animation: sc-shimmer 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes sc-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- Écran de connexion ---- */
.login { grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login__hero {
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(0, 194, 245, .55) 0%, transparent 60%),
    radial-gradient(50% 50% at 90% 85%, rgba(37, 99, 235, .55) 0%, transparent 60%),
    radial-gradient(70% 60% at 60% 40%, rgba(108, 92, 231, .45) 0%, transparent 70%),
    #06182a;
  position: relative; overflow: hidden;
}
.login__hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 80%); pointer-events: none; }
.login__hero::before { display: none; }
.login__hero-inner { z-index: 1; }
.login__hero-brand { margin-bottom: 40px; font-weight: 650; letter-spacing: -.02em; }
.login__hero h2 { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; color: #fff; }
.login__grad { background: linear-gradient(90deg, #67e8f9, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login__lead { color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.55; margin: 16px 0 28px; max-width: 420px; }
.login__apercu { position: relative; height: 196px; margin-bottom: 26px; }
.login__float { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); animation: sc-float 6s ease-in-out infinite; }
.login__float b { display: block; font-size: 14px; font-weight: 600; }
.login__float small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .65); }
.login__float--1 { top: 0; left: 0; }
.login__float--2 { top: 64px; left: 90px; animation-delay: -2s; }
.login__float--3 { top: 128px; left: 20px; animation-delay: -4s; }
.login__pt { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.login__pt--rouge { background: #f87171; } .login__pt--vert { background: #4ade80; } .login__pt--violet { background: #38bdf8; }
.login__features { margin: 0; gap: 10px; font-size: 14.5px; color: rgba(255, 255, 255, .8); }
.login__features span { background: rgba(255, 255, 255, .12); border-radius: 7px; }
.login__side { background: var(--bg); }
.login__card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 32px 30px; box-shadow: var(--shadow-md); max-width: 420px; animation: sc-pop .35s cubic-bezier(.2, .8, .2, 1) both; }
.login__brand h1 { font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.login__brand p { font-size: 14px; }
.login__modes { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.login__mode { font-weight: 520; font-size: 13.5px; border-radius: 8px; }
.login__mode[aria-pressed="true"] { box-shadow: var(--shadow-sm); font-weight: 600; }
.input--lg { min-height: 44px; font-size: 15px; }
@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login__hero { display: none; }
  .login__side { background: radial-gradient(80% 50% at 50% 0%, color-mix(in srgb, var(--brand-600) 14%, transparent), transparent 70%), var(--bg); }
  .login__card { padding: 26px 22px; box-shadow: var(--shadow-sm); }
  .login__brand .brand-mark { display: grid; }
}

/* ---- Pages vides illustrées ---- */
.empty { padding: 48px 20px; }
.empty__icon {
  position: relative; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); color: var(--brand-600);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand-600) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.empty__icon::before, .empty__icon::after { content: ''; position: absolute; border-radius: 26px; border: 1px dashed var(--border-2); inset: -14px; opacity: .7; }
.empty__icon::after { inset: -28px; border-radius: 34px; opacity: .35; }
.empty__icon .i { width: 26px; height: 26px; }
.empty strong { display: block; color: var(--text); font-weight: 600; font-size: 15.5px; margin-top: 6px; }
.empty p { max-width: 380px; margin: 6px auto 0; font-size: 13.5px; line-height: 1.5; }

/* ---- Jeu plus discret (série, XP, Ma journée, classement) ---- */
.pill-stat { padding: 6px 12px; gap: 8px; font-size: 14px; font-weight: 600; background: var(--surface) !important; border: 1px solid var(--border) !important; color: var(--text) !important; border-radius: 10px; }
.pill-stat__emoji { font-size: 16px; }
.pill-stat small { font-size: 11px; color: var(--text-3); }
.welcome__stats { gap: 8px; }
.welcome__avatar .avatar { border-radius: 16px; }
.day-card { padding: 20px; }
.bigbar { height: 8px; background: var(--surface-3); }
.bigbar > span { background: var(--brand-600) !important; }
.bigbar > span::after { display: none; }
.day-card__xp, .xp-pop { color: var(--text-2); }
.tiles { gap: 10px; }
.tile { padding: 12px 14px; gap: 12px; background: var(--surface); }
.tile__emoji { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; background: var(--surface-2) !important; }
.tile b { font-size: 14.5px; }
.tile__check { width: 24px; height: 24px; border-width: 2px; }
.tile.is-done { background: var(--surface) !important; border-color: var(--border) !important; border-bottom-color: var(--border) !important; }
.tile.is-done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.tile.is-done .tile__emoji { transform: none; }
.tile.is-done .tile__check, .tile.is-pending .tile__check { background: var(--success); border-color: var(--success); transform: none; }
.tile.is-pending { background: var(--success-bg) !important; border-color: color-mix(in srgb, var(--success) 35%, transparent) !important; }
.tile__tag { background: var(--text); font-weight: 600; }
.done-banner { border-width: 1px; border-radius: 14px; font-weight: 560; }
.leader__row { padding: 10px 14px; }
.leader__row.is-me { background: var(--brand-50); border-color: var(--brand-200); }
.leader__rank { font-size: 16px; font-weight: 600; }
.week__dot { width: 22px; height: 22px; font-size: 11px; border: 0; }
.week__dot--full { background: var(--success); } .week__dot--part { background: #f59e0b; } .week__dot--none { background: var(--danger); }
.quick__count, .tile__lock { font-weight: 600; }
.celebrate__emoji { font-size: 56px; }

/* ---- Thème sombre peaufiné ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .welcome, :root:not([data-theme="light"]) .el-tete { background: radial-gradient(120% 140% at 0% 0%, rgba(43, 181, 238, .14) 0%, transparent 55%), var(--surface); }
  :root:not([data-theme="light"]) .empty__icon { box-shadow: 0 10px 24px -12px rgba(43, 181, 238, .45); }
  :root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
  :root:not([data-theme="light"]) .assist__emoji { background: var(--surface-2); }
  :root:not([data-theme="light"]) .btn { box-shadow: none; }
  :root:not([data-theme="light"]) .sidebar { background: #0e0e14; }
  :root:not([data-theme="light"]) .nav-link[aria-current="page"] { background: var(--surface-2); border-color: var(--border-2); }
  :root:not([data-theme="light"]) .tache .btn--danger { background: #b91c1c; border-color: #b91c1c; }
}
:root[data-theme="dark"] .welcome, :root[data-theme="dark"] .el-tete { background: radial-gradient(120% 140% at 0% 0%, rgba(43, 181, 238, .14) 0%, transparent 55%), var(--surface); }
:root[data-theme="dark"] .empty__icon { box-shadow: 0 10px 24px -12px rgba(43, 181, 238, .45); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
:root[data-theme="dark"] .assist__emoji { background: var(--surface-2); }
:root[data-theme="dark"] .btn { box-shadow: none; }
:root[data-theme="dark"] .sidebar { background: #0e0e14; }
:root[data-theme="dark"] .nav-link[aria-current="page"] { background: var(--surface-2); border-color: var(--border-2); }
:root[data-theme="dark"] .tache .btn--danger { background: #b91c1c; border-color: #b91c1c; }
.login__side { width: 100%; min-height: 100%; }
.login__card { margin: 0 auto; width: 100%; }
.dash-relances, .dash-relances--suivi { background: var(--surface) !important; border: 1px solid var(--border) !important; border-left: 3px solid var(--brand-600) !important; }
.dash-relances b { font-weight: 600; }
.carte-install-pc { border: 1px solid var(--border) !important; border-radius: 16px !important; box-shadow: var(--shadow-sm) !important; }
@media (max-width: 700px) {
  .reminder { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; }
  .reminder__icon { width: 34px !important; height: 34px !important; grid-row: 1; }
  .reminder > .grow { grid-column: 2; grid-row: 1; }
  .reminder > .btn { grid-column: 2; grid-row: 2; justify-self: start; min-height: 32px; font-size: 13px; }
  .reminder__plus-tard, .reminder > .icon-btn { grid-column: 3; grid-row: 1; }
  .reminder p { font-size: 13px; }
}
