
:root{
  --fx-bg:#eef1f7; --fx-surface:#fff; --fx-ink:#1b2135; --fx-muted:#6b7390;
  --fx-line:#e6e9f2; --fx-primary:#4338ca; --fx-primary-2:#6d5ef0; --fx-accent:#f59e0b;
  --fx-belfius:#E2001A; --fx-belfius-2:#B00015;
  --fx-shadow:0 1px 2px rgba(20,25,45,.04), 0 8px 24px -12px rgba(20,25,45,.18);
  --fx-shadow-lg:0 2px 4px rgba(20,25,45,.05), 0 18px 40px -18px rgba(20,25,45,.28);
}
[data-bs-theme="dark"]{
  --fx-bg:#0f1320; --fx-surface:#171c2c; --fx-ink:#eef1f8; --fx-muted:#9aa3c2;
  --fx-line:#262c40; --fx-shadow:0 8px 24px -12px rgba(0,0,0,.6); --fx-shadow-lg:0 18px 40px -18px rgba(0,0,0,.7);
}

/* fond du contenu (Poppins hérité d'AdminKit, pas de font-family imposée) */
main.content{ background:var(--fx-bg); }

/* ---- CARTES : arrondi + ombre + survol ---- */
.card{
  border:1px solid var(--fx-line);
  border-radius:1.1rem;
  box-shadow:var(--fx-shadow);
  transition:transform .18s ease, box-shadow .18s ease;
  overflow:hidden;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--fx-shadow-lg); }
.card-header{ background:transparent; border-bottom:1px solid var(--fx-line); padding:1rem 1.25rem .85rem; }
/* scopé DANS .card : ne rétrécit pas le H1 de page (hors carte) */
.card .card-title{ font-size:1rem; font-weight:600; margin-bottom:0; }
.card-body{ padding:1.1rem 1.25rem; }

/* ---- Carrousel ---- */
.carousel-item img{ height:480px; object-fit:cover; }
.carousel-item::after{ content:""; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(12,15,30,.7), transparent 55%); }
.carousel-caption{ text-align:left; left:6%; right:6%; bottom:1rem; z-index:2; }
.carousel-caption p{ font-weight:600; font-size:1.05rem; margin:0; }

.carousel-caption p a,
.carousel-caption p a:link,
.carousel-caption p a:visited{
  color:#fff;
  text-decoration:none;
  display:inline-block;
}
.carousel-caption p a:hover,
.carousel-caption p a:focus{
  color:#fff;
  text-decoration:underline;
}
/*
JUSTE POUR LA LARGEUR 
*/
.carousel-caption p a,
.carousel-caption p a:link,
.carousel-caption p a:visited{
  display:block;
  width:100%;
  text-align:left;
  color:#fff;
  text-decoration:none;
  background:rgba(12,15,30,.28);
  backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.15);
  padding:.75rem 1.25rem;
  border-radius:.5rem;
  font-size:1.05rem;
  text-shadow:0 1px 3px rgba(0,0,0,.5);
  transition:background .2s ease;
}
.carousel-caption p a:hover,
.carousel-caption p a:focus{
  background:rgba(12,15,30,.5);
  color:#fff;
}

.carousel-item::after{ pointer-events:none; }


/* ---- Tables (scopées .card pour ne pas déborder ailleurs) ---- */
.card .table{ margin:0; }
.card .table thead th{ font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--fx-muted);
  font-weight:600; border-bottom:1px solid var(--fx-line); }
.card .table td, .card .table th{ border-color:var(--fx-line); vertical-align:middle; }
.card .table.table-striped>tbody>tr:nth-of-type(odd)>*{ --bs-table-bg-type:transparent; }
.card .table-hover>tbody>tr:hover>*{ background:rgba(67,56,202,.05); }
.card .table td img{ border-radius:.6rem; object-fit:cover; }


/* ---- Bouton assistant flottant (FAB) — rouge Belfius ---- */
.assistant-fab{
  position:fixed; right:24px; bottom:24px; z-index:1040;
  width:58px; height:58px; border-radius:50%;
  display:grid; place-items:center; color:#fff; border:0;
  background:linear-gradient(135deg, var(--fx-belfius), var(--fx-belfius-2));
  box-shadow:0 6px 20px -4px rgba(226,0,26,.55);
  transition:transform .18s ease, box-shadow .18s ease;
}
.assistant-fab:hover{
  transform:translateY(-3px) scale(1.05);
  box-shadow:0 10px 28px -4px rgba(226,0,26,.7); color:#fff;
}
.assistant-fab i{ width:24px; height:24px; }
.assistant-fab::after{
  content:""; position:absolute; inset:0; border-radius:50%;
  box-shadow:0 0 0 0 rgba(226,0,26,.5);
  animation:fab-pulse 2.4s ease-out infinite;
}
@keyframes fab-pulse{
  0%   { box-shadow:0 0 0 0 rgba(226,0,26,.45); }
  70%  { box-shadow:0 0 0 16px rgba(226,0,26,0); }
  100% { box-shadow:0 0 0 0 rgba(226,0,26,0); }
}

@media (prefers-reduced-motion: reduce){
  .card{ transition:none; }
  .assistant-fab::after{ animation:none; }
}

/* ---- Offcanvas assistant ---- */
.assistant-panel{ width:380px; }
.assistant-head{ border-bottom:1px solid var(--fx-line); }
.assistant-avatar{ width:40px; height:40px; border-radius:50%; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,var(--fx-belfius),var(--fx-belfius-2)); box-shadow:0 4px 12px -3px rgba(226,0,26,.5); }
.assistant-avatar i{ width:20px; height:20px; }
.assistant-status{ font-size:.72rem; color:var(--fx-muted); display:flex; align-items:center; gap:.35rem; }
.assistant-status .dot{ width:7px; height:7px; border-radius:50%; background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.6); animation:status-pulse 2s ease-out infinite; }
@keyframes status-pulse{ 0%{box-shadow:0 0 0 0 rgba(34,197,94,.6)} 70%{box-shadow:0 0 0 5px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }

.assistant-search .input-group{ box-shadow:var(--fx-shadow); border-radius:.8rem; overflow:hidden; }
.assistant-search .input-group-text{ background:#fff; border:0; color:var(--fx-muted); }
.assistant-search .form-control,
.assistant-search .form-control:focus{ border:0; box-shadow:none; }
.assistant-search .btn-search{ background:var(--fx-belfius); color:#fff; border:0; }
.assistant-search .btn-search:hover{ background:var(--fx-belfius-2); color:#fff; }
.assistant-search .input-group:focus-within{ box-shadow:0 0 0 3px rgba(226,0,26,.15), var(--fx-shadow); }

.suggest-label{ font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--fx-muted); font-weight:600; margin-bottom:.5rem; }
.assistant-chip{ font-size:.8rem; font-weight:500; text-decoration:none; padding:.35rem .7rem; border-radius:2rem;
  background:rgba(226,0,26,.07); color:var(--fx-belfius); border:1px solid rgba(226,0,26,.15); transition:background .15s, transform .15s; }
.assistant-chip:hover{ background:rgba(226,0,26,.13); transform:translateY(-1px); color:var(--fx-belfius); }

.assistant-learning{ border:1px dashed var(--fx-line); border-radius:1rem; padding:1.1rem; text-align:center; background:var(--fx-bg); }
.assistant-learning h6{ font-weight:700; }
.assistant-learning p{ font-size:.82rem; color:var(--fx-muted); }
.learning-dots{ display:flex; justify-content:center; gap:.35rem; margin-bottom:.6rem; }
.learning-dots span{ width:8px; height:8px; border-radius:50%; background:var(--fx-belfius); opacity:.4; animation:learn-bounce 1.4s ease-in-out infinite; }
.learning-dots span:nth-child(2){ animation-delay:.2s; }
.learning-dots span:nth-child(3){ animation-delay:.4s; }
@keyframes learn-bounce{ 0%,60%,100%{ transform:translateY(0); opacity:.4; } 30%{ transform:translateY(-5px); opacity:1; } }

@media (max-width:420px){ .assistant-panel{ width:100%; } }