:root{
  --primary:#1abc9c;
  --primary-dark:#159a80;

  --bg1:#e9f7f4;
  --bg2:#d7f1ea;

  --text:#1f2d3a;
  --muted:#5b6b79;

  --card:#ffffff;
  --border: rgba(31,45,58,0.10);
  --shadow: 0 18px 50px rgba(0,0,0,0.10);

  --radius: 18px;
  --radius-sm: 12px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
}

/* =========================================================
   GLOBAL (front) — optionnel si tu l'utilises sur landing/auth
   ========================================================= */

.front-bg{
  min-height:100vh;
  background:
    radial-gradient(900px 400px at 20% 10%, rgba(26,188,156,0.16), transparent 60%),
    radial-gradient(900px 400px at 90% 60%, rgba(26,188,156,0.10), transparent 55%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}

.front-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
}

/* =========================================================
   BOOTSTRAP OVERRIDES (safe)
   - On ne redéfinit PAS .btn globalement (sinon ça casse Bootstrap)
   ========================================================= */

.btn.btn-primary{
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn.btn-primary:hover{
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.form-control:focus,
.form-select:focus{
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(26,188,156,0.12) !important;
}

/* =========================================================
   LANDING (si tu l'utilises)
   ========================================================= */

.landing{
  width:min(1040px, 100%);
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap:26px;
  align-items:stretch;
}
@media (max-width: 860px){
  .landing{ grid-template-columns:1fr; }
}

.landing-hero{
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}

.landing-logo{
  width: 180px;
  height: auto;
  display:block;
  margin-bottom: 14px;
}

.landing-title{
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  font-size: 40px;
  line-height: 1.1;
}

.landing-tagline{
  margin: 0 0 10px 0;
  font-weight: 700;
  color: var(--text);
  font-size: 18px;
}

.landing-sub{
  margin: 0 0 18px 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 58ch;
}

.landing-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 6px;
}

.landing-footnote{
  margin-top: 14px;
  color: rgba(31,45,58,0.55);
  font-size: 12px;
}

.landing-card{ display:flex; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =========================================================
   AUTH (si tu l'utilises)
   ========================================================= */

.auth-glass{
  width:min(460px, 100%);
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}

.auth-head{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom: 16px;
}

.auth-logo--sm{
  width: 90px;
  height: auto;
  display:block;
  flex: 0 0 auto;
}

/* =======================================================
   REALISATION FORM — UX mobile / premium
   ======================================================= */

.realisation-wrap{
  width: 100%;
  display: flex;
  justify-content: center;
}

.realisation-form{
  width: min(760px, 100%);
}

/* Steps */
.form-step{ margin-bottom: 16px; }
.form-step.is-hidden{ display:none !important; }

.field-title{
  font-weight: 780;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.field-error{
  margin-top: 10px;
  color: rgba(231,76,60,1);
  font-weight: 650;
  font-size: 13px;
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 576px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* =======================================================
   Choice boxes (Urgence / Autonomie)
   - Fix: radios alignés + espacés
   ======================================================= */

.bdx-choice-box,
.bdx-autonomy-box{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.02);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  gap: 10px;
}

/* Symfony rend souvent: <div class="form-check"> <input> <label> */
.bdx-choice-box .form-check,
.bdx-autonomy-box .form-check{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.06);
  background: rgba(255,255,255,0.75);
}

.bdx-choice-box .form-check:hover,
.bdx-autonomy-box .form-check:hover{
  background: rgba(15,23,42,0.03);
}

.bdx-choice-box .form-check-input,
.bdx-autonomy-box .form-check-input{
  margin: 0 !important;
  float: none !important;
  transform: scale(1.08);
  flex: 0 0 auto;
}

.bdx-choice-box .form-check-label,
.bdx-autonomy-box .form-check-label{
  margin: 0 !important;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
}

/* Autonomie: couleurs (selon l'ordre des choix) */
.bdx-autonomy-box .form-check:nth-child(1){ background: rgba(59,130,246,0.09); }  /* Aide */
.bdx-autonomy-box .form-check:nth-child(2){ background: rgba(245,158,11,0.10); }  /* 1ère aide */
.bdx-autonomy-box .form-check:nth-child(3){ background: rgba(168,85,247,0.10); }  /* Op assisté */
.bdx-autonomy-box .form-check:nth-child(4){ background: rgba(34,197,94,0.10); }   /* Op principal */

/* =======================================================
   Gestes container (checkbox list triée)
   ======================================================= */

.gestes-container{
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  height: 240px;
  overflow-y: auto;
  padding: 10px;
}

.geste-item{
  display:none;
  align-items:center;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  gap: 10px;
}

.geste-item input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
}

.geste-item label{
  margin:0;
  font-weight: 700;
  cursor:pointer;
}

.muted-hint{
  color: rgba(15,23,42,0.55);
  font-style: italic;
  text-align:center;
  padding: 18px 8px;
  margin:0;
}

/* Tant qu’aucune intervention n’est choisie */
.gestes-container.is-disabled{
  opacity: .85;
}
.gestes-container.is-disabled .geste-item{
  display:none !important;
}

/* =======================================================
   REALISATION – RADIOS (Urgence + Autonomie) : spacing + look
   ======================================================= */

.bdx-choice-box,
.bdx-autonomy-box{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.02);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 10px;
}

/* Symfony rend souvent: <div class="form-check"> <input ...> <label ...> */
.bdx-choice-box .form-check,
.bdx-autonomy-box .form-check{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.06);
  background: rgba(255,255,255,0.78);
}

.bdx-choice-box .form-check:hover,
.bdx-autonomy-box .form-check:hover{
  background: rgba(15,23,42,0.03);
}

/* ✅ IMPORTANT: bootstrap met parfois du margin-top/float */
.bdx-choice-box .form-check-input,
.bdx-autonomy-box .form-check-input{
  margin: 0 !important;
  float: none !important;
  flex: 0 0 auto;
  transform: scale(1.12);
}

.bdx-choice-box .form-check-label,
.bdx-autonomy-box .form-check-label{
  margin: 0 !important;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
}

/* Autonomie: couleurs par VALUE (robuste) */
.bdx-autonomy-box .form-check[data-role="aide"]{ background: rgba(59,130,246,0.10); }
.bdx-autonomy-box .form-check[data-role="premiere_aide"]{ background: rgba(245,158,11,0.12); }
.bdx-autonomy-box .form-check[data-role="operateur_assiste"]{ background: rgba(168,85,247,0.12); }
.bdx-autonomy-box .form-check[data-role="operateur_principal"]{ background: rgba(34,197,94,0.12); }

/* Urgence: couleurs */
.bdx-choice-box .form-check[data-urg="0"]{ background: rgba(15,23,42,0.04); }
.bdx-choice-box .form-check[data-urg="1"]{ background: rgba(239,68,68,0.10); }

/* =======================================================
   RESTORE PACK — éléments UI souvent supprimés par erreur
   (à mettre EN FIN de fichier pour gagner la priorité)
   ======================================================= */

/* ---------- Topbar / header (si tu l’utilises dans app_base) ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 18px;
}

/* ---------- CTA button (tu l’utilises: btn btn-primary btn-cta) ---------- */
.btn-cta{
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}
.btn-cta:active{
  transform: translateY(1px);
}

/* ---------- Dashboard titles (vus dans tes templates) ---------- */
.bdx-dashboard-title{
  font-weight: 850;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1.1;
}
.bdx-dashboard-subtitle{
  font-size: 13px;
}

/* ---------- Cards helpers ---------- */
.bdx-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.bdx-card-pad{ padding: 16px; }
.bdx-soft{ background: rgba(15,23,42,0.02); }

/* ---------- Badges / pills ---------- */
.bdx-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.75);
  font-weight: 750;
  font-size: 12px;
}
.bdx-pill .dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--primary);
}

/* ---------- Overlay “Nouveau semestre” (stage-overlay / stage-modal) ---------- */
.stage-overlay{
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15,23,42,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.stage-modal{
  width: min(560px, 100%);
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 55px rgba(0,0,0,0.22);
  padding: 18px;
  backdrop-filter: blur(10px);
}
.stage-modal h2{
  margin: 10px 0 8px 0;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.stage-modal p{
  margin: 0 0 14px 0;
  color: var(--muted);
}

/* ---------- Tables (listes) ---------- */
.bdx-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.85);
}
.bdx-table th, .bdx-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  vertical-align: middle;
}
.bdx-table th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(15,23,42,0.60);
  background: rgba(15,23,42,0.03);
}
.bdx-table tr:last-child td{ border-bottom: 0; }

/* ---------- Small helpers ---------- */
.bdx-muted{ color: var(--muted) !important; }
.bdx-shadow{ box-shadow: 0 18px 50px rgba(0,0,0,0.10) !important; }
.bdx-radius{ border-radius: var(--radius) !important; }

/* ===========================
   FRONT — buttons / effects
   =========================== */

/* Motion + shape (scopé front) */
.front-shell .btn{
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background-color .12s ease, border-color .12s ease;
}

.front-shell .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

.front-shell .btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

.front-shell .btn:focus,
.front-shell .btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(26,188,156,0.18), 0 14px 28px rgba(0,0,0,0.10);
}

/* Ghost (ton "Se connecter") */
.front-shell .btn-ghost{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(31,45,58,0.14);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.front-shell .btn-ghost:hover{
  background: rgba(255,255,255,0.72);
  border-color: rgba(31,45,58,0.22);
}

/* Primary: micro “premium” */
.front-shell .btn.btn-primary{
  box-shadow: 0 12px 26px rgba(26,188,156,0.22);
}
.front-shell .btn.btn-primary:hover{
  filter: brightness(0.98);
}

/* ===============================
   LANDING — centered version
   =============================== */

.landing--centered{
  display:flex;
  justify-content:center;
  align-items:center;
}

.landing-hero--centered{
  width: min(640px, 100%);
  text-align: center;
}

.landing-hero--centered .landing-sub{
  margin-left: auto;
  margin-right: auto;
}

.landing-hero--centered .landing-actions{
  justify-content: center;
}

/* ===============================
   LANDING — centered adjustments
   =============================== */

.landing-hero--centered{
  width: min(640px, 100%);
  text-align: center;
}

.landing-hero--centered .landing-logo{
  margin: 0 auto 18px auto;
  display: block;
}

.landing-hero--centered .landing-sub{
  margin-left: auto;
  margin-right: auto;
}

.landing-hero--centered .landing-actions{
  justify-content: center;
}

/* ===========================
   AUTH — links (login footer)
   =========================== */

.auth-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top: 14px;
  font-size: 13px;
}

.auth-link{
  color: rgba(31,45,58,0.70);
  text-decoration: none;
  font-weight: 750;
  transition: color .12s ease, text-decoration-color .12s ease;
}

.auth-link:hover{
  color: rgba(31,45,58,0.92);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26,188,156,0.55);
}

.auth-links-sep{
  color: rgba(31,45,58,0.35);
  user-select: none;
}

/* ===========================
   AUTH extra links
   =========================== */

.auth-link,
.auth-forgot{
  color: rgba(31,45,58,0.70);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.auth-link:hover,
.auth-forgot:hover{
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.auth-forgot{
  display:inline-block;
}