/* ═══════════════════════════════════════════════════════════════════
   EDUCORE UI v3 — système de design autonome
   Fonctionne AVEC ou SANS Bootstrap : toutes les classes utilisées
   par l'application sont définies ici. Chargé en dernier, il impose
   le même rendu professionnel en ligne comme hors ligne.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --edu-encre: #0f1e2e;
  --edu-encre-2: #16283c;
  --edu-craie: #1f8a70;
  --edu-craie-fonce: #15735c;
  --edu-craie-clair: #e6f4f0;
  --edu-or: #e9b44c;
  --edu-fond: #f2f5f9;
  --edu-surface: #ffffff;
  --edu-bordure: #e4e9f0;
  --edu-texte: #24303e;
  --edu-muted: #64748b;
  --edu-danger: #d64550;
  --edu-warning: #e9a23b;
  --edu-info: #3b82c4;
  --edu-radius: 14px;
  --edu-radius-sm: 10px;
  --edu-ombre-sm: 0 1px 2px rgba(15, 30, 46, .05);
  --edu-ombre: 0 10px 30px -14px rgba(15, 30, 46, .25);
  --edu-police: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--edu-fond); color: var(--edu-texte);
  font-family: var(--edu-police); font-size: .925rem; line-height: 1.55;
}
h1, h2, h3, h4, h5, .h4, .h5 { margin: 0 0 .5rem; font-weight: 700; line-height: 1.25; color: var(--edu-encre); }
.h4 { font-size: 1.35rem; } .h5 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--edu-craie); text-decoration: none; }
a:hover { color: var(--edu-craie-fonce); }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--edu-bordure); margin: 1rem 0; }
dl, ul, ol { margin: 0 0 1rem; }
label { display: inline-block; }
button { font-family: inherit; }
::selection { background: rgba(31, 138, 112, .2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c3ccd6; border-radius: 8px; border: 2px solid var(--edu-fond); }
::-webkit-scrollbar-thumb:hover { background: #a9b5c2; }

/* ── Grille (équivalent Bootstrap, autosuffisante) ────────────── */
.row { --g: 1.5rem; display: flex; flex-wrap: wrap; margin: calc(var(--g) / -2); }
.row > * { padding: calc(var(--g) / 2); width: 100%; min-width: 0; }
.g-2 { --g: .6rem; } .g-3 { --g: 1rem; } .g-4 { --g: 1.5rem; }
.col-1{width:8.333%}.col-2{width:16.666%}.col-3{width:25%}.col-4{width:33.333%}
.col-5{width:41.666%}.col-6{width:50%}.col-7{width:58.333%}.col-8{width:66.666%}
.col-9{width:75%}.col-10{width:83.333%}.col-11{width:91.666%}.col-12{width:100%}
@media (min-width: 576px) {
  .col-sm-6 { width: 50%; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}
@media (min-width: 768px) {
  .col-md-1{width:8.333%}.col-md-2{width:16.666%}.col-md-3{width:25%}
  .col-md-4{width:33.333%}.col-md-5{width:41.666%}.col-md-6{width:50%}
  .col-md-7{width:58.333%}.col-md-8{width:66.666%}.col-md-9{width:75%}
  .col-md-10{width:83.333%}.col-md-12{width:100%}
}
@media (min-width: 992px) {
  .col-lg-1{width:8.333%}.col-lg-2{width:16.666%}.col-lg-3{width:25%}
  .col-lg-4{width:33.333%}.col-lg-5{width:41.666%}.col-lg-6{width:50%}
  .col-lg-7{width:58.333%}.col-lg-8{width:66.666%}.col-lg-9{width:75%}
  .col-lg-10{width:83.333%}.col-lg-12{width:100%}
}
@media (min-width: 1200px) { .col-xl-3 { width: 25%; } .col-xl-4 { width: 33.333%; } }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.align-self-start { align-self: flex-start !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }

/* ── Utilitaires ──────────────────────────────────────────────── */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
.place-items-center { place-items: center !important; }
.gap-1 { gap: .25rem !important; } .gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }  .gap-4 { gap: 1.5rem !important; }
.m-0{margin:0!important}
.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}
.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}
.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}
.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}
.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}
.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}
.me-auto{margin-right:auto!important}.ms-auto{margin-left:auto!important}
.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}
.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}
.my-3{margin-top:1rem!important;margin-bottom:1rem!important}
.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}
.p-0{padding:0!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}
.px-4{padding-left:1.5rem!important;padding-right:1.5rem!important}
.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}
@media (min-width: 768px) { .p-md-5 { padding: 2.6rem !important; } }
.w-100 { width: 100% !important; } .h-100 { height: 100% !important; }
.text-start{text-align:left!important}.text-center{text-align:center!important}.text-end{text-align:right!important}
.text-muted { color: var(--edu-muted) !important; }
.text-danger { color: var(--edu-danger) !important; }
.text-warning { color: #b97f19 !important; }
.text-success { color: var(--edu-craie) !important; }
.text-white { color: #fff !important; }
.text-decoration-none { text-decoration: none !important; }
.text-uppercase { text-transform: uppercase !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: .82em; }
.fs-5 { font-size: 1.15rem !important; } .fs-6 { font-size: .95rem !important; }
.border { border: 1px solid var(--edu-bordure) !important; }
.border-0 { border: 0 !important; }
.rounded { border-radius: var(--edu-radius-sm) !important; }
.shadow-sm { box-shadow: var(--edu-ombre-sm) !important; }
.opacity-75 { opacity: .75 !important; }
.list-unstyled { list-style: none; padding-left: 0; }
.bg-light-subtle { background: #f8fafc !important; }
.bg-white { background: #fff !important; }

/* ── Boutons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.45;
  padding: .5rem 1rem; border-radius: var(--edu-radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: all .16s ease; white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-sm { padding: .32rem .68rem; font-size: .8rem; border-radius: 8px; }
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #23997d, var(--edu-craie));
  border-color: var(--edu-craie); box-shadow: 0 4px 12px -4px rgba(31, 138, 112, .5);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--edu-craie), var(--edu-craie-fonce)); color: #fff; }
.btn-outline-secondary { color: #47566a; background: #fff; border-color: #cfd8e3; }
.btn-outline-secondary:hover { background: #f2f6fa; color: var(--edu-encre); border-color: #b9c5d3; }
.btn-outline-danger { color: var(--edu-danger); background: #fff; border-color: #ecc4c8; }
.btn-outline-danger:hover { background: var(--edu-danger); color: #fff; border-color: var(--edu-danger); }
.btn-outline-success { color: var(--edu-craie); background: #fff; border-color: #bcdcd3; }
.btn-outline-success:hover { background: var(--edu-craie); color: #fff; border-color: var(--edu-craie); }
.btn-outline-warning { color: #a06a10; background: #fff; border-color: #ecd5a8; }
.btn-outline-warning:hover { background: var(--edu-warning); color: #fff; border-color: var(--edu-warning); }

/* Groupes + radios "pilule" (feuille d'appel) */
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; transform: none; }
.btn-group > .btn:first-of-type,
.btn-group > .btn-check:first-child + .btn { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group > .btn:last-of-type { border-radius: 0 8px 8px 0; }
.btn-check { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }
.btn-check:checked + .btn-outline-success { background: var(--edu-craie); color: #fff; border-color: var(--edu-craie); }
.btn-check:checked + .btn-outline-danger { background: var(--edu-danger); color: #fff; border-color: var(--edu-danger); }
.btn-check:checked + .btn-outline-warning { background: var(--edu-warning); color: #fff; border-color: var(--edu-warning); }
.btn-check:focus-visible + .btn { outline: 2px solid var(--edu-craie); outline-offset: 1px; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 600; line-height: 1;
  padding: .36em .6em; border-radius: 7px; vertical-align: middle;
}
.text-bg-primary   { background: var(--edu-craie-clair); color: var(--edu-craie-fonce); }
.text-bg-success   { background: #e5f6ee; color: #14804a; }
.text-bg-danger    { background: #fdecee; color: #b93641; }
.text-bg-warning   { background: #fdf3e1; color: #9a6a12; }
.text-bg-info      { background: #e8f1fb; color: #2b6cab; }
.text-bg-secondary { background: #eef1f5; color: #5b6a7c; }
.text-bg-dark      { background: var(--edu-encre-2); color: #fff; }
.text-bg-light     { background: #fff; color: #47566a; }
.badge.border      { border-color: #dbe2ea !important; }
.badge.fs-6        { font-size: .9rem; padding: .45em .7em; }

/* ── Cartes ───────────────────────────────────────────────────── */
.card {
  background: var(--edu-surface); border: 1px solid var(--edu-bordure);
  border-radius: var(--edu-radius); box-shadow: var(--edu-ombre-sm);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
.card-header {
  display: flex; align-items: center; min-height: 54px;
  padding: .75rem 1.15rem; font-weight: 700; color: var(--edu-encre);
  background: transparent; border-bottom: 1px solid var(--edu-bordure);
}
.card-header > span:first-child { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.card-body { padding: 1.15rem; flex: 1; }
.card > .card-body + .card-body { border-top: 1px solid var(--edu-bordure); }

/* ── Formulaires ──────────────────────────────────────────────── */
.form-label { display: block; margin-bottom: .35rem; font-size: .84rem; font-weight: 600; color: var(--edu-encre); }
.form-control, .form-select {
  display: block; width: 100%; font-family: inherit; font-size: .9rem;
  color: var(--edu-texte); background: #fff;
  border: 1px solid #d3dbe4; border-radius: var(--edu-radius-sm);
  padding: .52rem .8rem; transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6.5 6 6.5-6' stroke='%2364748b' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2.2rem;
}
select[multiple].form-select { background-image: none; padding-right: .8rem; }
.form-control:focus, .form-select:focus {
  outline: 0; border-color: var(--edu-craie);
  box-shadow: 0 0 0 .22rem rgba(31, 138, 112, .13);
}
.form-control::placeholder { color: #9aa7b5; }
.form-control:disabled, .form-select:disabled { background: #f1f4f8; color: #94a1b0; }
.form-control-sm, .form-select-sm { padding: .34rem .6rem; font-size: .83rem; border-radius: 8px; }
.form-select-sm { padding-right: 2rem; }
.form-text { margin-top: .3rem; font-size: .78rem; color: var(--edu-muted); }
.form-check { display: flex; align-items: center; gap: .45rem; }
.form-check-input {
  width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--edu-craie); cursor: pointer;
}
.form-check-label { cursor: pointer; }
.input-group { display: flex; width: 100%; }
.input-group > .form-control { border-radius: var(--edu-radius-sm) 0 0 var(--edu-radius-sm); flex: 1; }
.input-group > .form-control:not(:first-child) { border-radius: 0; border-left: 0; }
.input-group > .form-control:last-child { border-radius: 0 var(--edu-radius-sm) var(--edu-radius-sm) 0; }
.input-group-text {
  display: inline-flex; align-items: center; padding: .52rem .8rem;
  border: 1px solid #d3dbe4; border-right: 0; color: var(--edu-muted);
  border-radius: var(--edu-radius-sm) 0 0 var(--edu-radius-sm); background: #fff;
}
.input-group > .btn { border-radius: 0 var(--edu-radius-sm) var(--edu-radius-sm) 0; border-left: 0; transform: none; }

/* ── Tableaux ─────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; margin-bottom: .5rem; }
.table thead th {
  font-size: .7rem; font-weight: 700; letter-spacing: .55px; text-transform: uppercase;
  color: #6b7a8c; text-align: left; white-space: nowrap;
  background: #f7f9fc; border-bottom: 1px solid var(--edu-bordure);
  padding: .6rem .75rem;
}
.table td { padding: .62rem .75rem; border-bottom: 1px solid #eef2f6; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr { transition: background .12s; }
.table-hover tbody tr:hover { background: rgba(31, 138, 112, .045); }
.table-sm th, .table-sm td { padding: .42rem .6rem; }
.align-middle, .align-middle th, .align-middle td, td.align-middle { vertical-align: middle; }
.table .btn-sm { padding: .24rem .48rem; }
.table-secondary td { background: #f1f4f8; }
.table tfoot td { font-weight: 700; background: #f4f7fa; border-top: 2px solid var(--edu-bordure); }
td.text-end form.d-inline { margin-left: .15rem; }
.table thead th.text-end { text-align: right; }

/* ── Alertes / progression / listes ───────────────────────────── */
.alert {
  position: relative; padding: .8rem 1rem .8rem 1.15rem;
  border-radius: var(--edu-radius-sm); font-size: .875rem; margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.alert-info    { background: #eef5fc; color: #29567f; border-color: #d7e6f5; }
.alert-info::before { background: var(--edu-info); }
.alert-warning { background: #fdf6e7; color: #7c5a10; border-color: #f3e3bd; }
.alert-warning::before { background: var(--edu-warning); }
.alert-danger  { background: #fdeef0; color: #8f2b34; border-color: #f4d2d6; }
.alert-danger::before { background: var(--edu-danger); }
.progress { height: 8px; background: #e8edf3; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--edu-craie); border-radius: 99px; transition: width .5s ease; }
.progress-bar.bg-success { background: var(--edu-craie); }
.progress-bar.bg-warning { background: var(--edu-warning); }
.progress-bar.bg-danger  { background: var(--edu-danger); }

/* ── Menus déroulants ─────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 1000;
  min-width: 200px; padding: .45rem; margin: 0; list-style: none;
  background: #fff; border: 1px solid var(--edu-bordure);
  border-radius: 12px; box-shadow: var(--edu-ombre);
}
.dropdown-menu-end { left: auto; right: 0; }
.dropdown-menu.show { display: block; animation: eduPop .14s ease; }
.dropdown-item {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  padding: .5rem .7rem; border-radius: 8px; color: var(--edu-texte);
  font-size: .875rem; text-decoration: none; background: none; border: 0; cursor: pointer;
}
.dropdown-item:hover { background: #f2f6fa; color: var(--edu-encre); }
.dropdown-item.text-danger:hover { background: #fdeef0; color: var(--edu-danger); }
.dropdown-item-text { display: block; padding: .4rem .7rem; }
.dropdown-divider { margin: .35rem 0; border: 0; border-top: 1px solid var(--edu-bordure); }
@keyframes eduPop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

/* ═══════════════ STRUCTURE DE L'APPLICATION ═══════════════ */
.edu-wrapper { display: flex; min-height: 100vh; }

/* ── Barre latérale ───────────────────────────────────────────── */
.edu-sidebar {
  width: 264px; flex-shrink: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #101d2c 0%, #0f1e2e 55%, #12283a 100%);
  color: #cfd9e4; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #2c3f53 transparent;
}
.edu-sidebar::-webkit-scrollbar { width: 6px; }
.edu-sidebar::-webkit-scrollbar-thumb { background: #2c3f53; border: 0; }
.edu-brand {
  display: flex; align-items: center; gap: .8rem;
  padding: 1.15rem 1.25rem 1rem; text-decoration: none; color: #fff;
}
.edu-brand .logo {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; font-weight: 800; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, #2aa887, var(--edu-craie));
  box-shadow: 0 6px 16px -6px rgba(31, 138, 112, .7);
}
.edu-brand .titre {
  display: block; font-weight: 800; letter-spacing: 1.5px; font-size: 1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px;
}
.edu-brand small { display: block; color: #7f93a8; font-size: .72rem; }
.edu-nav { flex: 1; padding: .4rem .8rem 1rem; position: relative; }
.edu-nav .section-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  margin: 1.15rem .45rem .35rem; padding: .2rem .35rem; background: none; border: 0;
  font-size: .66rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: #5d7189; cursor: pointer; border-radius: 6px; transition: color .15s ease, background .15s ease;
}
.edu-nav .section-toggle:hover { color: var(--edu-craie); background: rgba(31,138,112,.08); }
.edu-nav .section-toggle i { font-size: .75rem; transition: transform .25s ease; }
.edu-nav .section-toggle.replie i { transform: rotate(-90deg); }
.edu-nav .section-corps { overflow: hidden; }
.edu-nav a {
  position: relative; display: flex; align-items: center; gap: .7rem;
  padding: .56rem .8rem; margin-bottom: 2px; border-radius: 10px;
  color: #a9bacb; font-size: .875rem; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s, padding-left .15s;
}
.edu-nav a i { width: 1.15rem; text-align: center; font-size: 1rem; flex-shrink: 0; }
.edu-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; padding-left: .95rem; }
.edu-nav a.active {
  background: linear-gradient(90deg, rgba(31, 138, 112, .28), rgba(31, 138, 112, .08));
  color: #fff; font-weight: 600;
}
.edu-nav a.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px;
  border-radius: 3px; background: var(--edu-craie);
}
.edu-nav a.bientot { opacity: .42; cursor: default; }
.edu-nav a.bientot:hover { background: none; padding-left: .8rem; color: #a9bacb; }
.edu-nav a.bientot::after {
  content: 'bientôt'; margin-left: auto; font-size: .58rem; letter-spacing: .5px;
  padding: .15rem .4rem; border-radius: 5px; background: rgba(233, 180, 76, .18); color: var(--edu-or);
}
.edu-sidebar .pied {
  padding: .9rem 1.25rem; font-size: .7rem; color: #5d7189;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

/* ── Barre du haut ────────────────────────────────────────────── */
.edu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.edu-topbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 1rem; min-height: 64px;
  padding: .55rem 1.6rem;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edu-bordure);
}
.titre-page { font-size: 1.08rem; font-weight: 700; margin: 0; color: var(--edu-encre); }
.fil { display: flex; align-items: center; font-size: .75rem; color: var(--edu-muted); }
.fil a { color: var(--edu-muted); }
.fil a:hover { color: var(--edu-craie); }
.btn-burger {
  display: none; border: 1px solid var(--edu-bordure); background: #fff;
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center; color: var(--edu-encre);
}
.chip-date {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; color: var(--edu-muted);
  border: 1px solid var(--edu-bordure); background: #fff;
  padding: .42rem .75rem; border-radius: 99px;
}
.chip-user {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  background: #fff; border: 1px solid var(--edu-bordure) !important;
  padding: .32rem .7rem .32rem .38rem; border-radius: 99px;
  transition: box-shadow .15s, border-color .15s;
}
.chip-user:hover { border-color: #c7d2de !important; box-shadow: var(--edu-ombre-sm); }
.chip-user .infos { text-align: left; line-height: 1.15; }
.chip-user .nom { font-size: .8rem; font-weight: 700; color: var(--edu-encre); }
.chip-user .role { font-size: .68rem; color: var(--edu-muted); text-transform: capitalize; }
.avatar {
  width: 34px; height: 34px; flex-shrink: 0; display: inline-grid; place-items: center;
  border-radius: 50%; font-size: .8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2aa887, var(--edu-craie-fonce));
}

/* ── Zone de contenu ──────────────────────────────────────────── */
.edu-content { flex: 1; padding: 1.6rem 1.9rem 3rem; }
.edu-content > * { max-width: 1440px; margin-left: auto; margin-right: auto; }
.edu-content > .card, .edu-content > .row, .edu-content > div {
  animation: eduMonte .4s cubic-bezier(.2, .7, .3, 1) both;
}
.edu-content > *:nth-child(2) { animation-delay: .05s; }
.edu-content > *:nth-child(3) { animation-delay: .1s; }
@keyframes eduMonte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Cartes statistiques du tableau de bord ───────────────────── */
.stat-card { flex-direction: row; align-items: center; gap: 1rem; padding: 1.05rem 1.15rem; }
.stat-card:hover { box-shadow: var(--edu-ombre); transform: translateY(-2px); transition: all .18s ease; }
.stat-card .tuile {
  width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 14px; font-size: 1.35rem; color: #fff;
}
.tuile-verte  { background: linear-gradient(135deg, #2aa887, #1c7a63); box-shadow: 0 8px 18px -8px rgba(31,138,112,.65); }
.tuile-bleue  { background: linear-gradient(135deg, #4a90d9, #2f6cab); box-shadow: 0 8px 18px -8px rgba(59,130,196,.65); }
.tuile-or     { background: linear-gradient(135deg, #efc063, #d99a26); box-shadow: 0 8px 18px -8px rgba(233,180,76,.7); }
.tuile-rouge  { background: linear-gradient(135deg, #e4636d, #c23641); box-shadow: 0 8px 18px -8px rgba(214,69,80,.65); }
.tuile-violette { background: linear-gradient(135deg, #8f7ae5, #6a52c9); box-shadow: 0 8px 18px -8px rgba(122,98,214,.6); }
.stat-card .valeur { font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--edu-encre); }
.stat-card .libelle {
  font-size: .68rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--edu-muted); margin: .1rem 0;
}

/* ── Divers applicatif ────────────────────────────────────────── */
.etat-vide { text-align: center; padding: 2.6rem 1rem; color: var(--edu-muted); }
.etat-vide i { font-size: 2.3rem; opacity: .4; display: block; margin-bottom: .6rem; }
.etat-vide p { margin: 0; font-size: .9rem; }
.liste-activites .item {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .55rem 0; border-bottom: 1px dashed #e7ecf2; font-size: .84rem;
}
.liste-activites .item:last-child { border-bottom: 0; }
.card dl.row { --g: .4rem; }
.card dl.row dt { color: var(--edu-muted); font-weight: 500; }
.card dl.row dd { margin: 0; }

/* ── Page de connexion ────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--edu-fond);
}
.login-visuel {
  position: relative; padding: 3.2rem 3.4rem; color: #cfd9e4;
  background:
    radial-gradient(700px 380px at 85% -10%, rgba(31, 138, 112, .35), transparent 60%),
    radial-gradient(560px 320px at -10% 110%, rgba(233, 180, 76, .16), transparent 55%),
    linear-gradient(160deg, #101d2c, #0f1e2e 60%, #142c40);
  display: flex; flex-direction: column; justify-content: center;
}
.login-visuel h2 { color: #fff; font-size: 1.9rem; line-height: 1.25; margin: 0 0 .8rem; }
.login-visuel .points { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 1.1rem; }
.login-visuel .point { display: flex; gap: .9rem; font-size: .86rem; color: #a9b8c6; }
.login-visuel .point i {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; font-size: 1.1rem; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1);
}
.login-formulaire { display: grid; place-items: center; padding: 2rem; }
.login-card {
  width: 100%; max-width: 430px; border: 0;
  box-shadow: 0 24px 60px -24px rgba(15, 30, 46, .35);
  animation: eduMonte .5s cubic-bezier(.2, .7, .3, 1) both;
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visuel { display: none; }
}

/* ── Habillage DataTables / Select2 (quand chargés) ───────────── */
div.dt-buttons { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
.btn-excel, .btn-pdf, .btn-print {
  border: 1px solid var(--edu-bordure); background: #fff; color: var(--edu-encre);
  font-weight: 600; transition: all .15s ease;
}
.btn-excel:hover { background: #eaf7f1; border-color: #1c7a63; color: #14624f; }
.btn-pdf:hover   { background: #fdeeef; border-color: #d64550; color: #b93641; }
.btn-print:hover { background: #eef4fb; border-color: #4a90d9; color: #2f6cab; }
.btn-excel i { color: #1c7a63; } .btn-pdf i { color: #d64550; } .btn-print i { color: #4a90d9; }
div.dataTables_wrapper div.dataTables_filter input {
  min-width: 220px; margin-left: .4rem; display: inline-block; width: auto;
  border: 1px solid #d3dbe4; border-radius: var(--edu-radius-sm); padding: .38rem .7rem;
}
div.dataTables_wrapper div.dataTables_filter input:focus {
  outline: 0; border-color: var(--edu-craie); box-shadow: 0 0 0 .2rem rgba(31, 138, 112, .12);
}
div.dataTables_info { color: var(--edu-muted); font-size: .8rem; padding-top: .4rem; }
div.dataTables_paginate { display: flex; justify-content: flex-end; gap: .25rem; }
div.dataTables_paginate .paginate_button {
  padding: .3rem .68rem; border-radius: 8px; cursor: pointer;
  color: var(--edu-texte) !important; border: 1px solid transparent; text-decoration: none;
}
div.dataTables_paginate .paginate_button:hover { background: #eef2f7; border-color: #dbe2ea; }
div.dataTables_paginate .paginate_button.current {
  background: var(--edu-craie) !important; color: #fff !important; border-color: var(--edu-craie);
}
div.dataTables_paginate .paginate_button.disabled { opacity: .4; pointer-events: none; }
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single,
.select2-container--bootstrap-5 .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--bootstrap-5 .select2-selection--multiple {
  border: 1px solid #d3dbe4; border-radius: var(--edu-radius-sm); min-height: 40px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; padding-left: .8rem; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
.select2-container--open .select2-selection--single,
.select2-container--open .select2-selection--multiple { border-color: var(--edu-craie) !important; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--bootstrap-5 .select2-results__option--highlighted { background: var(--edu-craie); color: #fff; }
.select2-dropdown { border: 1px solid var(--edu-bordure); border-radius: 12px; box-shadow: var(--edu-ombre); }

/* ── Réactif ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .edu-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1050;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  }
  body.sidebar-open .edu-sidebar { transform: none; }
  body.sidebar-open::after {
    content: ''; position: fixed; inset: 0; z-index: 1040; background: rgba(15, 30, 46, .45);
  }
  .btn-burger { display: inline-flex; }
  .edu-content { padding: 1.1rem 1rem 2.5rem; }
  .edu-topbar { padding: .55rem 1rem; }
}

/* ── Impression ───────────────────────────────────────────────── */
@media print {
  .edu-sidebar, .edu-topbar, .dt-buttons, .dataTables_filter,
  .dataTables_length, .dataTables_paginate, .dataTables_info,
  .btn, form.form-delete { display: none !important; }
  body { background: #fff; }
  .edu-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
:focus-visible { outline: 2px solid var(--edu-craie); outline-offset: 2px; }

/* Priorité correcte des utilitaires réactifs (déclarés après .d-none) */
@media (min-width: 576px) {
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

/* ═══ Éléments dynamiques (educore.js) ═══ */
#barreNav {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3000;
  background: linear-gradient(90deg, var(--edu-craie), var(--edu-or));
  transition: width .4s ease; pointer-events: none;
}
#barreNav.active { width: 82%; }
@keyframes eduLigne { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.edu-tableau-outils {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem;
}
.edu-compteur { font-size: .8rem; color: var(--edu-muted); }
.edu-recherche { max-width: 260px; }
th.triable { cursor: pointer; user-select: none; position: relative; padding-right: 1.3rem !important; }
th.triable:hover { color: var(--edu-craie-fonce); }
th.triable::after {
  content: '⇅'; position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  font-size: .7rem; opacity: .35;
}
th.triable.tri-asc::after  { content: '↑'; opacity: 1; color: var(--edu-craie); }
th.triable.tri-desc::after { content: '↓'; opacity: 1; color: var(--edu-craie); }
.edu-pagination { display: flex; justify-content: flex-end; align-items: center; gap: .25rem; margin-top: .8rem; }
.edu-pagination button {
  min-width: 32px; padding: .3rem .55rem; font: inherit; font-size: .82rem;
  border: 1px solid transparent; background: none; border-radius: 8px; cursor: pointer;
  color: var(--edu-texte);
}
.edu-pagination button:hover { background: #eef2f7; border-color: #dbe2ea; }
.edu-pagination button.actif { background: var(--edu-craie); color: #fff; }
.edu-pagination button:disabled { opacity: .4; pointer-events: none; }
.edu-pagination span { color: var(--edu-muted); padding: 0 .2rem; }

/* Graphiques de secours (sans Chart.js) */
.mini-barres { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: .5rem; }
.mini-barres .colonne { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0; }
.mini-barres .tige {
  width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #2aa887, var(--edu-craie-fonce));
  box-shadow: 0 6px 14px -8px rgba(31, 138, 112, .8);
  animation: eduBarre .7s cubic-bezier(.2, .7, .3, 1) both;
  transform-origin: bottom;
}
.mini-barres .colonne:nth-child(2) .tige { animation-delay: .06s; }
.mini-barres .colonne:nth-child(3) .tige { animation-delay: .12s; }
.mini-barres .colonne:nth-child(4) .tige { animation-delay: .18s; }
.mini-barres .colonne:nth-child(5) .tige { animation-delay: .24s; }
.mini-barres .colonne:nth-child(6) .tige { animation-delay: .3s; }
@keyframes eduBarre { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mini-barres .etiquette { font-size: .68rem; color: var(--edu-muted); white-space: nowrap; }
.mini-barres .montant { font-size: .66rem; font-weight: 700; color: var(--edu-encre); }
.anneau-wrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.anneau {
  width: 150px; height: 150px; border-radius: 50%; position: relative;
  animation: eduPop .5s ease both;
}
.anneau::after {
  content: ''; position: absolute; inset: 20px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 2px 6px rgba(15, 30, 46, .08);
}
.anneau .centre {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-weight: 800; font-size: 1.3rem; color: var(--edu-encre);
}
.anneau .centre small { display: block; font-size: .6rem; font-weight: 600; color: var(--edu-muted); text-align: center; }
.legende-anneau { display: flex; flex-direction: column; gap: .45rem; font-size: .8rem; }
.legende-anneau .pastille {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .45rem;
}
.mini-barres .colonne { height: 100%; justify-content: flex-end; }

/* ═══ Emploi du temps — grille hebdomadaire type agenda ═══ */
.edt-grille {
  display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--edu-bordure); border-radius: 12px; background: #fff;
}
.edt-col { flex: 1 1 0; min-width: 122px; border-right: 1px solid var(--edu-bordure); }
.edt-col:last-child { border-right: 0; }
.edt-col-heures { flex: 0 0 54px; min-width: 54px; }
.edt-entete {
  height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--edu-encre); background: #f7f9fc; border-bottom: 1px solid var(--edu-bordure);
  position: sticky; top: 0; z-index: 2;
}
.edt-col-heures .edt-entete { background: #fff; }
.edt-corps { position: relative; border-bottom: 1px solid var(--edu-bordure); }
.edt-repere-heure {
  position: absolute; left: 0; right: 6px; text-align: right;
  font-size: .66rem; color: var(--edu-muted); transform: translateY(-1px);
}
.edt-ligne { position: absolute; left: 0; right: 0; border-top: 1px solid #eef2f6; }
.edt-cours {
  position: absolute; left: 4px; right: 4px; border-radius: 8px; border-left: 3px solid;
  padding: .32rem .5rem; overflow: hidden; box-shadow: 0 2px 6px rgba(15, 30, 46, .07);
  transition: box-shadow .15s ease, transform .15s ease; animation: eduMonte .3s ease both;
}
.edt-cours:hover { box-shadow: 0 8px 20px rgba(15, 30, 46, .18); transform: translateY(-1px); z-index: 6; }
.edt-matiere { font-size: .76rem; font-weight: 700; line-height: 1.2; }
.edt-detail  { font-size: .66rem; opacity: .82; margin-top: 1px; white-space: nowrap; }
.edt-prof    { font-size: .64rem; opacity: .72; margin-top: 1px; white-space: nowrap; }
.edt-suppr { position: absolute; top: 2px; right: 2px; margin: 0; }
.edt-suppr button {
  border: 0; background: rgba(255, 255, 255, .65); border-radius: 6px;
  width: 18px; height: 18px; display: grid; place-items: center;
  font-size: .58rem; cursor: pointer; opacity: 0; transition: opacity .15s; color: inherit;
}
.edt-cours:hover .edt-suppr button { opacity: 1; }
.edt-suppr button:hover { background: rgba(255, 255, 255, .95); }
.edt-legende { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .9rem; font-size: .76rem; color: var(--edu-muted); }
.edt-legende .puce { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .35rem; vertical-align: middle; }
@media (max-width: 900px) { .edt-col { min-width: 100px; } }

/* ═══ Titres de section à l'intérieur d'un formulaire ═══ */
.form-section-titre {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--edu-craie-fonce); padding-bottom: .5rem; margin-bottom: .25rem;
  border-bottom: 2px solid var(--edu-craie-clair);
  display: flex; align-items: center; gap: .4rem;
}
/* ═══ Matrice Rôles & Permissions (fine, par action) ═══ */
.table-permissions thead th {
  position: sticky; top: 0; background: #f7f9fc; z-index: 2;
  text-align: center; font-size: .68rem;
}
.table-permissions thead th:first-child,
.table-permissions thead th:nth-child(2) { text-align: left; }
.table-permissions tr.theme-permissions td {
  background: var(--edu-encre-2); color: #fff; font-weight: 700;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
  padding: .45rem .9rem;
}
.table-permissions td.module-permissions {
  vertical-align: middle; border-right: 1px solid var(--edu-bordure);
  background: #f7f9fc;
}
.table-permissions td .form-check-input { width: 1.15rem; height: 1.15rem; margin: 0; }
.table-permissions tbody tr:not(.theme-permissions):hover { background: rgba(31, 138, 112, .05); }

/* ═══ Avatars — photo réelle ou initiales de repli ═══ */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar-sm { width: 30px; height: 30px; font-size: .68rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.9rem; }

/* ═══ Widget de capture / sélection de photo ═══ */
.capture-photo { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.capture-apercu, .capture-photo video {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  background: #eef2f6; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--edu-bordure), var(--edu-ombre-sm);
}
.capture-photo canvas { display: none; }
.capture-photo .form-control { max-width: 220px; }
.capture-photo .boutons-capture { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }

/* ═══════════════════════════════════════════════════════════════════
   EDUCORE UI v4 — polish moderne : profondeur, fluidité, micro-interactions
   Vient se poser sur le système existant, ne remplace rien : chaque page
   en profite automatiquement puisqu'elles partagent toutes ce fichier.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --edu-ombre-carte: 0 1px 2px rgba(15,30,46,.04), 0 8px 24px -12px rgba(15,30,46,.14);
  --edu-ombre-carte-hover: 0 4px 10px rgba(15,30,46,.06), 0 16px 36px -14px rgba(15,30,46,.22);
  --edu-ressort: cubic-bezier(.34, 1.4, .64, 1);
  --edu-doux: cubic-bezier(.22, .7, .34, 1);
}

/* ── Cartes : profondeur plus riche, légère élévation au survol ──── */
.card {
  box-shadow: var(--edu-ombre-carte);
  transition: box-shadow .28s var(--edu-doux), transform .28s var(--edu-doux), border-color .2s;
}
.card:hover {
  box-shadow: var(--edu-ombre-carte-hover);
  transform: translateY(-1.5px);
  border-color: #d7dfe8;
}
.card:hover .card-header { border-color: #e7ecf2; }
.stat-card:hover { transform: translateY(-3px); }
.stat-card .tuile { transition: transform .3s var(--edu-ressort); }
.stat-card:hover .tuile { transform: scale(1.08) rotate(-3deg); }

/* ── Boutons : pression tactile, dégradés plus riches, ombre dynamique ── */
.btn {
  transition: transform .16s var(--edu-doux), box-shadow .2s var(--edu-doux), background .2s, border-color .2s, filter .2s;
  position: relative; overflow: hidden;
}
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary:hover { box-shadow: 0 6px 16px -4px rgba(31,138,112,.55); }
.btn-primary:active { box-shadow: 0 2px 6px -2px rgba(31,138,112,.5); }

/* Onde tactile (ripple) — déclenchée en jQuery sur .btn */
.ripple-vague {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255,255,255,.55); pointer-events: none;
  animation: eduRipple .55s var(--edu-doux) forwards;
}
.btn-outline-secondary .ripple-vague,
.btn-outline-success .ripple-vague,
.btn-outline-danger .ripple-vague,
.btn-outline-warning .ripple-vague { background: rgba(31,138,112,.16); }
@keyframes eduRipple { to { transform: scale(2.6); opacity: 0; } }

/* ── Barre latérale : indicateur actif "vivant" + transitions douces ── */
.edu-nav a {
  transition: background .22s var(--edu-doux), color .18s, padding-left .22s var(--edu-doux), transform .18s;
}
.edu-nav a:active { transform: scale(.98); }
.edu-nav-indicateur {
  position: absolute; left: 0; width: 3px; border-radius: 3px; background: var(--edu-craie);
  box-shadow: 0 0 10px 1px rgba(31,138,112,.6);
  transition: top .32s var(--edu-ressort), height .32s var(--edu-ressort), opacity .2s;
  opacity: 0; pointer-events: none;
}
.edu-brand .logo { transition: transform .35s var(--edu-ressort); }
.edu-brand:hover .logo { transform: rotate(-8deg) scale(1.06); }

/* ── Formulaires : focus plus vivant ──────────────────────────────── */
.form-control, .form-select {
  transition: border-color .2s var(--edu-doux), box-shadow .25s var(--edu-doux), transform .15s;
}
.form-control:focus, .form-select:focus { transform: translateY(-1px); }

/* ── Tableaux : lignes plus "souples" au survol ───────────────────── */
.table-hover tbody tr { transition: background-color .16s var(--edu-doux); }
.table tbody tr { animation: eduLigneEntree .32s var(--edu-doux) both; }
@keyframes eduLigneEntree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Badges avec un soupçon de relief ─────────────────────────────── */
.badge { box-shadow: 0 1px 2px rgba(15,30,46,.05); }
.badge.text-bg-primary, .badge.text-bg-success { box-shadow: 0 1px 3px rgba(31,138,112,.16); }

/* ── Avatars : anneau lumineux au survol ──────────────────────────── */
.avatar { transition: transform .25s var(--edu-ressort), box-shadow .25s; }
.chip-user:hover .avatar { transform: scale(1.07); box-shadow: 0 0 0 3px rgba(31,138,112,.18); }

/* ── Fondu d'entrée du contenu principal (page transition douce) ─── */
.edu-content.edu-pret { animation: eduFondu .4s var(--edu-doux) both; }
@keyframes eduFondu { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Bouton "Retour en haut" flottant ──────────────────────────────── */
.edu-haut {
  position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #2aa887, var(--edu-craie-fonce)); color: #fff; border: 0;
  box-shadow: 0 8px 20px -6px rgba(31,138,112,.55); display: grid; place-items: center;
  font-size: 1.1rem; cursor: pointer; z-index: 950;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.85);
  transition: opacity .25s var(--edu-doux), transform .3s var(--edu-ressort), visibility .25s;
}
.edu-haut.edu-visible { opacity: 1; visibility: visible; transform: none; }
.edu-haut:hover { transform: translateY(-3px) scale(1.05); }

/* ── Empty states avec une légère respiration ─────────────────────── */
.etat-vide i { transition: transform .3s var(--edu-ressort); }
.etat-vide:hover i { transform: scale(1.08) translateY(-2px); }

/* ── Overlay de soumission de formulaire (retour visuel immédiat) ── */
.edu-chargement {
  display: inline-flex; align-items: center; gap: .45rem;
}
.edu-spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: eduSpin .7s linear infinite;
}
.btn-outline-secondary .edu-spin, .btn-outline-danger .edu-spin,
.btn-outline-success .edu-spin, .btn-outline-warning .edu-spin {
  border-color: rgba(31,138,112,.25); border-top-color: var(--edu-craie);
}
@keyframes eduSpin { to { transform: rotate(360deg); } }

/* ── Tooltips (Bootstrap) aux couleurs de la maison ───────────────── */
.tooltip .tooltip-inner {
  background: var(--edu-encre-2); color: #fff; font-size: .74rem;
  padding: .4rem .65rem; border-radius: 7px; box-shadow: var(--edu-ombre);
}
.tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--edu-encre-2); }
.tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--edu-encre-2); }

@media (prefers-reduced-motion: reduce) {
  .card, .btn, .edu-nav a, .avatar, .table tbody tr, .edu-content.edu-pret,
  .stat-card .tuile, .edu-brand .logo, .edu-haut { animation: none !important; transition: none !important; }
}

/* ═══ Tableau de bord v2 — bannière, actions rapides, alertes ═══ */
.tuile-encre { background: linear-gradient(135deg, #2c4258, var(--edu-encre)); box-shadow: 0 8px 18px -8px rgba(22,40,60,.6); }

.db-banniere {
  background: linear-gradient(120deg, var(--edu-encre) 0%, #1c3245 55%, var(--edu-craie-fonce) 130%);
  border-radius: var(--edu-radius); padding: 1.5rem 1.75rem; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--edu-ombre);
}
.db-banniere::after {
  content: ''; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,.22), transparent 70%);
}
.db-banniere h1 { color: #fff; font-size: 1.4rem; margin-bottom: .2rem; }
.db-banniere .sous-titre { color: #b8c6d4; font-size: .88rem; }
.db-banniere .puce-annee {
  display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18); border-radius: 99px; padding: .35rem .85rem;
  font-size: .78rem; color: #e7edf3; backdrop-filter: blur(4px);
}
.db-horloge { font-variant-numeric: tabular-nums; font-weight: 700; }

.stat-mini {
  display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem;
}
.stat-mini .icone {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 1.05rem; color: #fff; flex-shrink: 0;
}
.stat-mini .valeur { font-size: 1.05rem; font-weight: 800; color: var(--edu-encre); line-height: 1.1; }
.stat-mini .libelle { font-size: .68rem; color: var(--edu-muted); text-transform: uppercase; letter-spacing: .5px; }

.action-rapide {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1rem .5rem; border-radius: var(--edu-radius-sm); border: 1px solid var(--edu-bordure);
  background: #fff; text-decoration: none; color: var(--edu-encre); text-align: center;
  transition: all .18s ease; font-size: .78rem; font-weight: 600;
}
.action-rapide i { font-size: 1.3rem; color: var(--edu-craie); }
.action-rapide:hover {
  transform: translateY(-3px); box-shadow: var(--edu-ombre); border-color: var(--edu-craie);
  color: var(--edu-encre);
}

.alerte-item {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .2rem;
  border-bottom: 1px dashed #eef2f6; font-size: .84rem;
}
.alerte-item:last-child { border-bottom: 0; }
.alerte-item .puce-alerte {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center;
  background: #fdf3e1; color: #9a6a12; font-size: .95rem;
}
.alerte-item.critique .puce-alerte { background: #fdecee; color: #b93641; }
.alerte-vide { text-align: center; padding: 1.4rem 0; color: var(--edu-craie); font-size: .85rem; }
.alerte-vide i { font-size: 1.6rem; display: block; margin-bottom: .4rem; }

/* ═══ Bandeau d'introduction en tête de module ═══ */
.module-intro {
  display: flex; gap: .65rem; align-items: flex-start;
  background: linear-gradient(135deg, #f3f8f6, #eef2f6);
  border: 1px solid var(--edu-bordure); border-left: 3px solid var(--edu-craie);
  border-radius: var(--edu-radius-sm); padding: .7rem .9rem; margin-bottom: 1rem;
  font-size: .82rem; color: #4a5b6e; line-height: 1.45;
}
.module-intro i { color: var(--edu-craie); font-size: 1rem; margin-top: .1rem; flex-shrink: 0; }
.module-intro b { color: var(--edu-encre); }
.module-intro a { color: var(--edu-craie-fonce); font-weight: 600; text-decoration: none; }
.module-intro a:hover { text-decoration: underline; }

/* ═══ Sous-navigation : regroupe des modules proches sous un même thème ═══ */
.sous-nav {
  position: relative; display: inline-flex; flex-wrap: wrap; gap: .15rem; margin-bottom: 1.1rem;
  background: #eef2f6; border-radius: 12px; padding: .3rem; border: 1px solid var(--edu-bordure);
}
.sous-nav a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.05rem; font-size: .82rem; font-weight: 600; color: #64748b;
  text-decoration: none; border-radius: 9px; transition: color .2s ease;
}
.sous-nav a:hover { color: var(--edu-craie-fonce); }
.sous-nav a.active {
  color: #fff; background: linear-gradient(120deg, var(--edu-encre), var(--edu-craie-fonce));
  box-shadow: 0 3px 10px -3px rgba(22,40,60,.45);
}
.sous-nav a .badge { font-weight: 700; }
.sous-nav-pastille {
  position: absolute; z-index: 0; top: .3rem; bottom: .3rem; left: .3rem;
  border-radius: 9px; background: linear-gradient(120deg, var(--edu-encre), var(--edu-craie-fonce));
  box-shadow: 0 3px 10px -3px rgba(22,40,60,.45);
  transition: left .28s var(--edu-ressort), width .28s var(--edu-ressort), opacity .2s;
  opacity: 0; pointer-events: none;
}

/* ═══ Variante compacte d'alerte (bannière d'avertissement inline) ═══ */
.alert-sm { padding: .5rem .85rem; font-size: .8rem; border-radius: 10px; }

/* ═══ Recherche instantanée dans le menu ═══ */
.edu-nav-recherche {
  position: relative; margin: .9rem .9rem .6rem; display: flex; align-items: center;
}
.edu-nav-recherche i.bi-search {
  position: absolute; left: .7rem; color: #7c93a8; font-size: .8rem; pointer-events: none;
}
.edu-nav-recherche input {
  width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; color: #e7edf3; font-size: .78rem; padding: .5rem .5rem .5rem 2rem;
  transition: background .18s ease, border-color .18s ease;
}
.edu-nav-recherche input::placeholder { color: #7c93a8; }
.edu-nav-recherche input:focus {
  outline: none; background: rgba(255,255,255,.1); border-color: var(--edu-craie, #1f8a70);
}
.edu-nav-recherche button {
  position: absolute; right: .55rem; background: none; border: 0; color: #7c93a8; padding: 0;
  display: flex; align-items: center; font-size: .8rem;
}
.edu-nav-recherche button:hover { color: #fff; }
.edu-nav-aucun {
  margin: 0 .9rem .6rem; padding: .6rem; text-align: center; font-size: .72rem;
  color: #7c93a8; background: rgba(255,255,255,.04); border-radius: 8px;
}
.edu-nav a.filtre-masque, .edu-nav .section-toggle.filtre-masque { display: none !important; }
.edu-nav mark {
  background: rgba(233,180,76,.35); color: inherit; border-radius: 3px; padding: 0 .1em;
}

/* ═══ Badge de compteur sur un lien du menu ═══ */
.edu-nav .badge-nav {
  margin-left: auto; background: linear-gradient(120deg, #e9b44c, #cf9f3f); color: #16283c;
  font-size: .64rem; font-weight: 800; border-radius: 99px; padding: .1rem .45rem; line-height: 1.4;
}

/* ═══ Entrée en cascade des liens du menu au chargement ═══ */
.edu-nav a, .edu-nav .section-toggle {
  opacity: 0; animation: navEntree .4s ease forwards;
}
@keyframes navEntree {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .edu-nav a, .edu-nav .section-toggle { animation: none; opacity: 1; }
}

/* ═══ Salut animé sur le tableau de bord (main dessinée, boucle continue) ═══ */
.main-salut {
  display: inline-block;
  transform-origin: 50% 85%;
  animation: vagueMain 2.4s ease-in-out infinite;
}
@keyframes vagueMain {
  0%, 58%, 100% { transform: rotate(0deg); }
  8%  { transform: rotate(18deg); }
  18% { transform: rotate(-8deg); }
  28% { transform: rotate(18deg); }
  38% { transform: rotate(-6deg); }
  48% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .main-salut { animation: none; }
}
