/* ===== Designet Formation — thème ===== */
:root {
  --ds-navy: #17406a;
  --ds-blue: #1e7fc1;
  --ds-cyan: #29aae2;
  --ds-light: #eaf4fb;
  --ds-bg: #f4f8fc;
  --ds-text: #1f2d3d;
  --ds-muted: #6b7c93;
  --ds-radius: 16px;
  --ds-shadow: 0 6px 24px rgba(23, 64, 106, .08);
  --bs-primary: #1e7fc1;
  --bs-primary-rgb: 30, 127, 193;
  --bs-link-color: #1e7fc1;
  --bs-link-hover-color: #17406a;
  --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: #1f2d3d;
}
body { font-family: var(--bs-body-font-family); background: var(--ds-bg); color: var(--ds-text); }
h1, h2, h3, h4, h5, h6 { color: var(--ds-navy); font-weight: 600; }
a { text-decoration: none; }

.btn { border-radius: 10px; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: #1e7fc1; --bs-btn-border-color: #1e7fc1;
  --bs-btn-hover-bg: #17406a; --bs-btn-hover-border-color: #17406a;
  --bs-btn-active-bg: #17406a; --bs-btn-active-border-color: #17406a;
  --bs-btn-disabled-bg: #1e7fc1; --bs-btn-disabled-border-color: #1e7fc1;
}
.btn-outline-primary {
  --bs-btn-color: #1e7fc1; --bs-btn-border-color: #1e7fc1;
  --bs-btn-hover-bg: #1e7fc1; --bs-btn-hover-border-color: #1e7fc1;
  --bs-btn-active-bg: #17406a; --bs-btn-active-border-color: #17406a;
}
.btn-gradient { background: linear-gradient(135deg, var(--ds-blue), var(--ds-cyan)); color: #fff; border: 0; }
.btn-gradient:hover { color: #fff; filter: brightness(.95); }
.form-control, .form-select { border-radius: 10px; padding: .6rem .85rem; border-color: #d8e3ee; }
.form-control:focus, .form-select:focus { border-color: var(--ds-cyan); box-shadow: 0 0 0 .2rem rgba(41, 170, 226, .18); }
.form-label { font-weight: 500; font-size: .875rem; color: var(--ds-navy); }
.card { border: 0; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); }
.card-header { background: transparent; border-bottom: 1px solid #edf2f7; font-weight: 600; color: var(--ds-navy); padding: 1rem 1.25rem; }

/* ===== Layout application ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px; background: #fff; border-right: 1px solid #e6edf5;
  position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column;
  transition: transform .25s ease; overflow-y: auto;
}
.sidebar .brand { padding: 1.25rem 1.5rem 1rem; text-align: center; }
.sidebar .brand img { width: 130px; max-width: 100%; }
.sidebar .role-pill {
  display: inline-block; margin-top: .5rem; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--ds-light); color: var(--ds-blue); padding: .25rem .75rem; border-radius: 99px; font-weight: 600;
}
.sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ds-muted); padding: 1rem 1.5rem .4rem; font-weight: 600; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; margin: .1rem 1rem;
  color: #4a5b70; border-radius: 12px; font-weight: 500; font-size: .92rem;
}
.sidebar .nav-link i { font-size: 1.1rem; }
.sidebar .nav-link:hover { background: var(--ds-light); color: var(--ds-blue); }
.sidebar .nav-link.active { background: linear-gradient(135deg, var(--ds-blue), var(--ds-cyan)); color: #fff; box-shadow: 0 6px 16px rgba(30, 127, 193, .3); }
.sidebar .nav-link .badge { margin-left: auto; }
.sidebar .sidebar-foot { margin-top: auto; padding: 1rem 0 1.25rem; border-top: 1px solid #edf2f7; }
.app-main { flex: 1; margin-left: 268px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6edf5; padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem;
}
.topbar h1 { font-size: 1.15rem; margin: 0; }
.app-content { padding: 1.75rem 1.5rem 3rem; }
.btn-icon { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--ds-light); color: var(--ds-navy); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: #d9ebf7; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--ds-navy), var(--ds-blue)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; flex-shrink: 0; }
.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h2 { margin: 0; font-size: 1.4rem; }
.page-head p { margin: 0; color: var(--ds-muted); }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .app-main { margin-left: 0; }
}

/* ===== Cartes statistiques ===== */
.stat-card { background: #fff; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem; height: 100%; }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--ds-navy); line-height: 1.1; }
.stat-label { color: var(--ds-muted); font-size: .82rem; }
.chart-box { position: relative; height: 290px; }

/* ===== Tables / DataTables ===== */
.table > :not(caption) > * > * { padding: .8rem .9rem; vertical-align: middle; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ds-muted); border-bottom: 1px solid #e6edf5; background: #f8fbfe; font-weight: 600; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border-radius: 10px; border: 1px solid #d8e3ee; padding: .4rem .75rem; }
.dataTables_wrapper .page-item.active .page-link { background: var(--ds-blue); border-color: var(--ds-blue); }
.dataTables_wrapper .page-link { border-radius: 8px; margin: 0 2px; color: var(--ds-blue); }
.dataTables_wrapper { padding: 1rem 1.25rem; }
.dataTables_wrapper .row { align-items: center; row-gap: .5rem; }

/* ===== Notifications ===== */
.notif-badge { position: absolute; top: -4px; right: -4px; background: #e5484d; color: #fff; font-size: .65rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; }
.notif-menu { width: 360px; max-width: 92vw; border: 0; border-radius: 16px; box-shadow: 0 16px 48px rgba(23, 64, 106, .2); overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid #edf2f7; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: .75rem; padding: .85rem 1.1rem; color: inherit; border-bottom: 1px solid #f1f5f9; }
.notif-item:hover { background: #f8fbfe; color: inherit; }
.notif-item.unread { background: #f2f9ff; }
.notif-item .n-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item .n-title { font-weight: 600; font-size: .86rem; color: var(--ds-navy); }
.notif-item .n-msg { font-size: .8rem; color: #55667b; line-height: 1.35; }
.notif-item .n-time { font-size: .7rem; color: var(--ds-muted); }
.notif-foot { display: block; text-align: center; padding: .75rem; font-weight: 500; font-size: .85rem; background: #f8fbfe; }
.toast-zone { position: fixed; top: 80px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; }
.toast-ds { background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(23, 64, 106, .25); padding: .85rem 1rem; display: flex; gap: .75rem; width: 330px; max-width: 90vw; border-left: 4px solid var(--ds-cyan); animation: slideIn .35s ease; cursor: pointer; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Site public ===== */
.public-nav { background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); box-shadow: 0 2px 16px rgba(23, 64, 106, .06); }
.public-nav .navbar-brand img { height: 54px; }
.public-nav .nav-link { font-weight: 500; color: var(--ds-navy); }
.public-nav .nav-link:hover, .public-nav .nav-link.active { color: var(--ds-blue); }
.hero { background: radial-gradient(1000px 500px at 85% 10%, rgba(41, 170, 226, .35), transparent), linear-gradient(135deg, #0f2f4f 0%, #17406a 55%, #1e7fc1 100%); color: #fff; padding: 5.5rem 0 6.5rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 700; line-height: 1.15; }
.hero h1 span { color: #7fd3f5; }
.hero p.lead { color: #cfe3f3; max-width: 560px; }
.hero .shape { position: absolute; border-radius: 28px; transform: rotate(35deg); opacity: .12; background: #fff; }
.hero-card { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(10px); border-radius: 24px; padding: 1.5rem; }
.hero-stats { margin-top: -3.5rem; position: relative; z-index: 2; }
.section { padding: 4.5rem 0; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 2rem; font-weight: 700; }
.section-title p { color: var(--ds-muted); }
.cat-tile { display: block; background: #fff; border-radius: var(--ds-radius); padding: 1.4rem 1.2rem; box-shadow: var(--ds-shadow); text-align: center; color: var(--ds-text); transition: transform .2s, box-shadow .2s; height: 100%; }
.cat-tile:hover { transform: translateY(-5px); box-shadow: 0 14px 32px rgba(23, 64, 106, .16); color: var(--ds-text); }
.cat-tile .ico { width: 60px; height: 60px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: .8rem; }
.cat-tile h6 { margin: 0; }
.cat-tile small { color: var(--ds-muted); }
.formation-card { overflow: hidden; transition: transform .2s, box-shadow .2s; }
.formation-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(23, 64, 106, .16); }
.formation-cover { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: rgba(255, 255, 255, .9); position: relative; }
.formation-cover .ribbon { position: absolute; top: 12px; right: 12px; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: .25rem .7rem; border-radius: 99px; align-self: flex-start; }
.formation-card .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .78rem; color: var(--ds-muted); }
.step-box { background: #fff; border-radius: var(--ds-radius); padding: 1.8rem; box-shadow: var(--ds-shadow); text-align: center; height: 100%; }
.step-box .num { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--ds-blue), var(--ds-cyan)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; }
.cta-band { background: linear-gradient(135deg, var(--ds-navy), var(--ds-blue)); color: #fff; border-radius: 28px; padding: 3rem 2rem; text-align: center; }
.cta-band h2 { color: #fff; }
.site-footer { background: #0f2f4f; color: #a9c0d6; padding: 3rem 0 1.5rem; }
.site-footer h6 { color: #fff; }
.site-footer a { color: #a9c0d6; }
.site-footer a:hover { color: #fff; }
.page-banner { background: linear-gradient(135deg, #0f2f4f, #1e7fc1); color: #fff; padding: 3rem 0; }
.page-banner h1 { color: #fff; }

/* ===== Authentification ===== */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side { flex: 1; background: radial-gradient(700px 400px at 80% 0%, rgba(41, 170, 226, .4), transparent), linear-gradient(145deg, #0f2f4f, #17406a 60%, #1e7fc1); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 2.2rem; }
.auth-side .logo-card { background: #fff; border-radius: 22px; padding: 1.2rem 1.8rem; display: inline-block; align-self: flex-start; margin-bottom: 2rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.auth-side .logo-card img { height: 78px; }
.auth-side li { margin-bottom: .7rem; color: #d3e6f5; }
.auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-form .box { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) { .auth-side { display: none; } }
.progress { height: 8px; border-radius: 99px; background: #e6eef6; }
.progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--ds-blue), var(--ds-cyan)); }
.progress-bar.full { background: #e5484d; }
