/* ==========================================================================
   Thème Prytanée — couche visuelle commune (ajoutée, ne remplace aucun style)
   Charte : bleu #0a2472 · jaune #fcbf49 · rouge #d62828 · vert #2e7d32
   Le mode sombre / contraste existant (filtre sur <html>) continue de s'appliquer.
   ========================================================================== */
:root{
  --tp-bleu:#0a2472; --tp-bleu2:#1b3a8f; --tp-jaune:#fcbf49; --tp-rouge:#d62828; --tp-vert:#2e7d32;
  --tp-fond:#f4f6fb; --tp-bord:#e3e8f3; --tp-texte:#1d2742;
  --tp-ombre:0 2px 6px rgba(10,36,114,.06),0 10px 28px rgba(10,36,114,.08);
  --tp-ombre-h:0 6px 14px rgba(10,36,114,.10),0 18px 40px rgba(10,36,114,.14);
  --tp-r:16px;
}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
::selection{background:rgba(252,191,73,.55);color:#0a2472}
*{scrollbar-width:thin;scrollbar-color:#9fb0dc transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#b8c5e6;border-radius:10px;border:2px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#8fa3d6;background-clip:content-box}

/* Fond de page doux (uniquement s'il n'est pas déjà défini par la page) */
main{background:linear-gradient(180deg,#f7f9fe 0,#f2f5fb 100%)}

/* Barre de progression de lecture (tricolore) */
#tp-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:99999;background:linear-gradient(90deg,var(--tp-bleu),var(--tp-jaune),var(--tp-rouge),var(--tp-vert));transition:width .12s linear;pointer-events:none}

/* ---------- Entrée en douceur ---------- */
@keyframes tp-up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
main .page-header,main .dashboard-header,main .dashboard-card,main .stat-card,main .stat-card-mini,main .card,main .filters-card,
main .action-card,main .pp-card,main .dashboard-section,main .empty-state{animation:tp-up .55s cubic-bezier(.2,.7,.2,1) both}
main .stat-card:nth-child(2),main .stat-card-mini:nth-child(2),main .dashboard-card:nth-child(2){animation-delay:.05s}
main .stat-card:nth-child(3),main .stat-card-mini:nth-child(3),main .dashboard-card:nth-child(3){animation-delay:.10s}
main .stat-card:nth-child(4),main .stat-card-mini:nth-child(4),main .dashboard-card:nth-child(4){animation-delay:.15s}
main .stat-card:nth-child(n+5),main .stat-card-mini:nth-child(n+5),main .dashboard-card:nth-child(n+5){animation-delay:.2s}

/* ---------- En-têtes de page sans bandeau : même élégance que les pages à bandeau ---------- */
main .page-header,main .dashboard-header{
  position:relative;overflow:hidden;background:linear-gradient(135deg,#ffffff 0,#f1f5ff 100%);
  border:1px solid var(--tp-bord);border-bottom:1px solid var(--tp-bord);border-radius:var(--tp-r);
  padding:22px 26px 22px 30px;margin-bottom:22px;box-shadow:var(--tp-ombre)}
main .page-header::before,main .dashboard-header::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;
  background:linear-gradient(180deg,var(--tp-bleu),var(--tp-jaune),var(--tp-rouge))}
main .page-header::after,main .dashboard-header::after{content:"";position:absolute;right:-40px;top:-60px;width:200px;height:200px;border-radius:50%;
  background:radial-gradient(circle,rgba(252,191,73,.22),rgba(252,191,73,0) 70%);pointer-events:none}
main .page-header h1,main .dashboard-header h1,main .page-title{letter-spacing:-.01em}
main .page-header h1 i,main .dashboard-header h1 i,main .page-title i{
  display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;margin-right:10px;border-radius:12px;font-size:18px;
  color:#fff;background:linear-gradient(135deg,var(--tp-bleu),var(--tp-bleu2));box-shadow:0 6px 14px rgba(10,36,114,.25);vertical-align:middle}
main .page-header p,main .dashboard-header p{color:#5b6585}
.date-display{background:#fff;border:1px solid var(--tp-bord);border-radius:999px;padding:7px 14px;box-shadow:0 2px 8px rgba(10,36,114,.06)}

/* Bandeau existant : légère profondeur */
.hero-section{box-shadow:0 14px 36px rgba(10,36,114,.22)}

/* ---------- Cartes ---------- */
main .dashboard-card,main .stat-card,main .stat-card-mini,main .card,main .filters-card,main .action-card,main .pp-card{
  border:1px solid var(--tp-bord);border-radius:var(--tp-r);box-shadow:var(--tp-ombre);
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
main .stat-card:hover,main .stat-card-mini:hover,main .action-card:hover,main .dashboard-card:hover{
  transform:translateY(-3px);box-shadow:var(--tp-ombre-h);border-color:#cfd8f0}
main .filters-card:hover,main .card:hover,main .pp-card:hover{box-shadow:var(--tp-ombre-h)}
main .card-header-custom,main .card-header{border-bottom:3px solid var(--tp-jaune)}
.stat-icon{box-shadow:0 8px 18px rgba(10,36,114,.22);transition:transform .25s ease}
.stat-card:hover .stat-icon,.stat-card-mini:hover .stat-icon{transform:scale(1.08) rotate(-4deg)}
.stat-value{letter-spacing:-.02em}

/* ---------- Boutons ---------- */
.btn,.pp-btn,.btn-primary,.btn-secondary,.btn-success,.btn-danger,.btn-outline-secondary,.btn-primary-small,button.btn-icon,a.btn-icon{
  transition:transform .15s ease,box-shadow .2s ease,background-color .2s ease,filter .2s ease,border-color .2s ease}
.btn:hover,.pp-btn:hover,.btn-primary:hover,.btn-success:hover,.btn-danger:hover,.btn-secondary:hover,.btn-primary-small:hover{
  transform:translateY(-1px);box-shadow:0 8px 18px rgba(10,36,114,.22);filter:brightness(1.06)}
.btn:active,.pp-btn:active,.btn-primary:active{transform:translateY(0);box-shadow:none}
.btn-primary,.btn-primary-small,.pp-btn{border-radius:10px}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid rgba(252,191,73,.9);outline-offset:2px;border-radius:8px}

/* ---------- Formulaires ---------- */
.form-control,main input[type=text],main input[type=email],main input[type=password],main input[type=number],main input[type=date],
main input[type=search],main input[type=tel],main select,main textarea{
  border:1.5px solid #d5dcee;border-radius:10px;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}
.form-control:focus,main input:focus,main select:focus,main textarea:focus{
  border-color:var(--tp-bleu2)!important;box-shadow:0 0 0 4px rgba(27,58,143,.14)!important;outline:none}
main input[type=checkbox],main input[type=radio]{accent-color:var(--tp-bleu)}

main .form-group label{margin-bottom:6px;display:inline-block}

/* ---------- Tableaux de données (classes .table / .data-table / .users-table ; bulletins et grilles spécifiques exclus) ---------- */
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table){border-collapse:separate;border-spacing:0}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) thead th{
  background:linear-gradient(180deg,#0e2a80,#0a2472);color:#fff;font-size:12.5px;text-transform:uppercase;letter-spacing:.05em;border:0;padding:12px 14px}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) thead th:first-child{border-top-left-radius:10px}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) thead th:last-child{border-top-right-radius:10px}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) tbody td{border-bottom:1px solid #edf0f8;padding:12px 14px;vertical-align:middle}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) tbody tr{transition:background-color .15s ease}
:is(main table.table,main table.data-table,main table.users-table):not(.table-notes):not(.notes-table) tbody tr:hover td{background:#eef3ff}
main .table-responsive{border-radius:12px;box-shadow:inset 0 0 0 1px var(--tp-bord)}

/* ---------- Badges, alertes, états vides ---------- */
.badge{letter-spacing:.02em;border-radius:999px}
.alert,.pp-al{border-radius:12px;border-left-width:5px}
.empty-state,.empty-state-small{border:2px dashed #d5dcee;border-radius:14px;background:linear-gradient(135deg,#fbfcff,#f4f7ff);color:#6a7596}
.empty-state i{opacity:.55}

/* ---------- Fenêtres modales ---------- */
.modal-content{border-radius:18px;box-shadow:0 24px 60px rgba(10,36,114,.30);border:0;overflow:hidden}
.modal-header{background:linear-gradient(135deg,var(--tp-bleu),var(--tp-bleu2));color:#fff;border-bottom:4px solid var(--tp-jaune)}
.modal-header h1,.modal-header h2,.modal-header h3,.modal-header h4,.modal-header h5,.modal-header .modal-title{color:#fff}
.modal-close,.modal-header .close{color:#fff;opacity:.9}

/* ---------- Pages d'actions (grilles de raccourcis) ---------- */
.quick-action{transition:transform .2s ease,box-shadow .2s ease}
.quick-action:hover{transform:translateY(-3px);box-shadow:var(--tp-ombre-h)}

/* ---------- Bouton « Haut de page » ---------- */
#tp-top{position:fixed;right:18px;bottom:18px;width:44px;height:44px;border:0;border-radius:50%;cursor:pointer;z-index:9990;
  background:linear-gradient(135deg,var(--tp-bleu),var(--tp-bleu2));color:#fff;font-size:18px;box-shadow:0 10px 24px rgba(10,36,114,.35);
  opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .25s ease,transform .25s ease}
#tp-top.on{opacity:1;transform:none;pointer-events:auto}
#tp-top:hover{filter:brightness(1.15)}

@media (max-width:640px){
  main .page-header,main .dashboard-header{padding:16px 16px 16px 20px}
  main .page-header h1 i,main .dashboard-header h1 i,main .page-title i{width:36px;height:36px;font-size:16px}
  #tp-top{right:12px;bottom:78px}
}
@media (prefers-reduced-motion:reduce){
  main *{animation:none!important;transition:none!important}
  html{scroll-behavior:auto}
}
@media print{
  #tp-progress,#tp-top{display:none!important}
  main .page-header,main .dashboard-header,main .dashboard-card,main .stat-card,main .card{animation:none!important;box-shadow:none!important}

}

/* ---------- Titres des pages applicatives : casse naturelle, taille mesurée ---------- */
main .hero-section .hero-title,main .hero-content h1{
  text-transform:none;font-size:clamp(1.55rem,3vw,2.35rem);line-height:1.2;letter-spacing:-.01em;font-weight:800;margin-bottom:8px}
main .hero-section .hero-subtitle{font-size:clamp(.95rem,1.4vw,1.1rem);opacity:.92}
main .page-header h1,main .dashboard-header h1,main .page-title,main .pp-title{
  text-transform:none;font-size:clamp(1.35rem,2.4vw,1.9rem);line-height:1.25;letter-spacing:-.01em}
main h2,main h3{text-transform:none}
main .modal-title,main .card-header-custom h2,main .card-header-custom h3{text-transform:none}
