/* Asterisk Franchise v1.4 — design AgefoddPortal (replique fidele) */
:root {
  --primary: #FF6B35; --primary-dark: #E85A25; --primary-light: #FF8C5A;
  --secondary: #1E293B; --accent: #10B981; --info: #3B82F6;
  --danger: #EF4444; --warning: #F59E0B; --purple: #8B5CF6;
  --primaire: var(--primary); --primaire-fonce: var(--primary-dark);
  --bord: #e2e8f0; --alerte: var(--danger);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f1f5f9; color: #1a202c; line-height: 1.6; }

/* ========== HEADER MODERNE (portal-header-modern) ========== */
.topbar { background: white; border-bottom: 1px solid #e2e8f0;
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 0.75rem 1.5rem; }
.header-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-icon { width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.25rem; overflow: hidden; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title { font-size: 1.15rem; font-weight: 800; color: var(--secondary); letter-spacing: -0.5px; }
.logo-subtitle { font-size: 0.75rem; color: #64748b; font-weight: 500; }
.userbox { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: #64748b; }
.userbox a { color: var(--primary); text-decoration: none; font-weight: 600; }
.tenant-switch select { border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px;
  font-size: 0.85rem; font-family: inherit; background: #fff; color: var(--secondary); }
.tenant-name { display: flex; align-items: center; gap: 6px; background: rgba(255,140,66,.08);
  color: var(--primary-dark); padding: 5px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.tenant-name img { height: 22px; }

/* ========== NAVIGATION ========== */
.mainnav { display: flex; list-style: none; margin: 0; padding: 0 1rem; overflow-x: auto;
  background: white; border-bottom: 1px solid #e2e8f0; position: sticky; top: 61px; z-index: 90; }
.mainnav a { display: flex; align-items: center; gap: 0.5rem; padding: 1rem 1.25rem;
  color: #64748b; text-decoration: none; font-weight: 500; font-size: 0.9rem;
  white-space: nowrap; border-bottom: 3px solid transparent; transition: all .2s; }
.mainnav a:hover { color: #FF8C42; background: rgba(255, 140, 66, 0.05); }
.mainnav a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700;
  background: rgba(255, 140, 66, 0.05); }
.nav-badge { min-width: 18px; height: 18px; background: var(--danger); color: white;
  font-size: 0.65rem; font-weight: 700; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }

.content { flex: 1; padding: 2rem 1.5rem; max-width: 1400px; margin: 0 auto; width: 100%; }
h1 { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.75rem;
  margin: 0 0 1.25rem; color: var(--secondary); }
h2 { color: var(--secondary); }
.section-title { font-size: 1.25rem; font-weight: 700; color: #1a202c; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem; }

/* ========== STAT CARDS ========== */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.carte { background: white; border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); border: 1px solid #f0f0f0; transition: all .25s; }
.carte:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); }
.carte .chiffre { font-size: 1.9rem; font-weight: 800; color: var(--secondary); }
.carte .libelle { color: #666; font-size: 0.9rem; margin-top: 0.25rem; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; color: white; margin-bottom: .6rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.stat-icon.violet { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.stat-icon.vert { background: linear-gradient(135deg, #10B981, #059669); }
.stat-icon.bleu { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }

/* ========== TABLES ========== */
table.liste { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem;
  border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.06); border: 1px solid #f0f0f0; }
table.liste th { text-align: left; background: #f8fafc; padding: 0.85rem 1rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: .4px; color: #64748b; font-weight: 700; }
table.liste td { padding: 0.8rem 1rem; border-top: 1px solid #f1f5f9; }
table.liste tr:hover td { background: rgba(255, 140, 66, 0.04); }
table.liste a { color: var(--primary-dark); font-weight: 600; text-decoration: none; }

/* ========== BOUTONS ========== */
.btn { display: inline-flex; align-items: center; gap: 0.375rem; background: var(--primary);
  color: white; border: none; padding: 0.6rem 1.1rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all 0.2s; font-family: inherit; }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3); }
.btn-sec { background: white; color: var(--secondary); border: 1px solid #e2e8f0; }
.btn-sec:hover { background: #f8fafc; box-shadow: none; color: var(--primary); }
.btn-violet { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.btn-danger { background: var(--danger); }

/* ========== FORMULAIRES ========== */
.form-champ { margin-bottom: 1rem; }
.form-champ label { display: block; font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 5px; }
.form-champ input, .form-champ select, .form-champ textarea { width: 100%; padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; background: #fff; font-family: inherit; }
.form-champ input:focus, .form-champ select:focus, .form-champ textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12); }
details > summary { cursor: pointer; list-style: none; display: inline-flex; }
details > summary::-webkit-details-marker { display: none; }

/* ========== LOGIN ========== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF6B35 0%, #E85A25 50%, #1E293B 100%); padding: 16px; }
.login-box { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 400px;
  box-shadow: 0 25px 60px rgba(0,0,0,.3); }
.login-box h1 { justify-content: center; }
.msg-erreur { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca;
  padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 1rem; }
.msg-ok { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0;
  padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.85rem; margin: 0.75rem 0; }

/* ========== PASTILLES ========== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem;
  background: rgba(255, 140, 66, 0.1); color: var(--primary-dark); font-weight: 700; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.pill-vert   { background: #d1fae5; color: #065f46; }
.pill-jaune  { background: #fef3c7; color: #92400e; }
.pill-rouge  { background: #fee2e2; color: #991b1b; }
.pill-indigo { background: #e0e7ff; color: #3730a3; }
.pill-gris   { background: #f1f5f9; color: #475569; }
.pill-violet { background: #ede9fe; color: #5b21b6; }

/* ========== PORTAILS ========== */
.ptabs { display: flex; gap: 0; overflow-x: auto; margin: 0 0 1.5rem; background: white;
  border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.06); border: 1px solid #f0f0f0; }
.ptabs a { padding: 0.9rem 1.15rem; color: #64748b; text-decoration: none; font-size: 0.85rem;
  white-space: nowrap; font-weight: 600; border-bottom: 3px solid transparent; transition: all .2s; }
.ptabs a:hover { color: #FF8C42; background: rgba(255,140,66,.05); }
.ptabs a.actif { color: var(--primary); border-bottom-color: var(--primary);
  background: rgba(255,140,66,.05); }
.portal-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 16px; padding: 1.5rem 1.75rem; margin-bottom: 1.5rem;
  box-shadow: 0 8px 30px rgba(232,90,37,.3); }
.portal-hero h1 { margin: 0 0 4px; color: #fff; }
.portal-hero .sous { opacity: .92; font-size: 0.9rem; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; margin: 0.5rem 0 1rem; align-items: center; }
.filtres a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0;
  text-decoration: none; color: #64748b; font-size: 0.8rem; font-weight: 600; transition: all .2s; }
.filtres a:hover { color: var(--primary); border-color: var(--primary-light); }
.filtres a.actif { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.ligne-stagiaire { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.ligne-stagiaire input { flex: 1; min-width: 110px; padding: 8px 10px;
  border: 1px solid #e2e8f0; border-radius: 8px; font-family: inherit; }

/* ========== CALENDRIER ========== */
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.cal-nav b { font-size: 1.05rem; color: var(--secondary); min-width: 170px; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-jour-nom { text-align: center; font-size: .7rem; text-transform: uppercase; color: #64748b; font-weight: 700; padding: 4px 0; }
.cal-case { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; min-height: 86px; padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); font-size: .72rem; }
.cal-case.vide { background: transparent; border: 0; box-shadow: none; }
.cal-case .num { font-weight: 700; color: #64748b; font-size: .75rem; }
.cal-case.auj { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,107,53,.25); }
.cal-chip { display: block; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 6px; padding: 2px 6px; margin-top: 4px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-chip.termine { background: #94a3b8; }
@media (max-width: 700px) { .cal-case { min-height: 60px; } .cal-chip { font-size: .6rem; } }

/* ========== NAVIGATION GROUPEE (v4) ========== */
.mainnav { overflow: visible; flex-wrap: wrap; }
.nav-grp { position: relative; }
.nav-grp > summary { display: flex; align-items: center; gap: 0.5rem; padding: 1rem 1.25rem;
  color: #64748b; font-weight: 500; font-size: 0.9rem; white-space: nowrap; cursor: pointer;
  border-bottom: 3px solid transparent; transition: all .2s; list-style: none; }
.nav-grp > summary::-webkit-details-marker { display: none; }
.nav-grp > summary:hover { color: #FF8C42; background: rgba(255, 140, 66, 0.05); }
.nav-grp.active > summary { color: var(--primary); border-bottom-color: var(--primary);
  font-weight: 700; background: rgba(255, 140, 66, 0.05); }
.nav-grp .nav-chev { font-size: 0.6rem; opacity: .6; transition: transform .2s; }
.nav-grp[open] .nav-chev { transform: rotate(180deg); }
.nav-grp[open] > summary { color: var(--primary); background: rgba(255, 140, 66, 0.05); }
.nav-panel { position: absolute; top: 100%; left: 0; z-index: 200; background: #fff;
  max-height: min(74vh, calc(100dvh - 120px)); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid #e2e8f0; border-radius: 0 0 12px 12px; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  min-width: 230px; padding: 0.4rem; }
.nav-panel a { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem;
  border-radius: 8px; border-bottom: none; font-size: 0.88rem; }
.nav-panel a.active { background: rgba(255, 140, 66, 0.1); border-bottom: none; }
.nav-panel a i:first-child { width: 18px; text-align: center; color: #94a3b8; }
.nav-panel a:hover i:first-child, .nav-panel a.active i:first-child { color: var(--primary); }
.nav-sep { padding: 0.55rem 0.9rem 0.25rem; font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; border-top: 1px solid #f1f5f9;
  margin-top: 0.3rem; }
@media (max-width: 720px) {
  .nav-panel { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; border-radius: 12px;
    max-height: calc(100dvh - 130px); overflow-y: auto; }
}

/* ========== POPUP NOTIFICATIONS (v4.1) ========== */
#notif-pop { position: fixed; right: 18px; bottom: 18px; z-index: 500; background: #fff;
  border: 1px solid #e2e8f0; border-left: 4px solid var(--primary); border-radius: 14px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22); width: min(340px, calc(100vw - 36px));
  padding: .6rem; animation: npIn .35s ease; }
@keyframes npIn { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
#notif-pop .np-tete { display: flex; align-items: center; gap: .5rem; font-weight: 800;
  font-size: .9rem; padding: .35rem .5rem .55rem; color: var(--primary-dark); }
#notif-pop .np-x { margin-left: auto; background: none; border: 0; font-size: 1.3rem;
  color: #94a3b8; cursor: pointer; line-height: 1; }
#notif-pop .np-x:hover { color: var(--danger); }
#notif-pop a { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem;
  border-radius: 8px; color: #334155; text-decoration: none; font-size: .87rem; font-weight: 600; }
#notif-pop a:hover { background: rgba(255, 140, 66, 0.08); color: var(--primary-dark); }
#notif-pop a i { width: 18px; text-align: center; color: var(--primary); }

/* ========== PLANNING (v4.6) ========== */
.pl-barre { display:flex; justify-content:space-between; gap:.75rem; flex-wrap:wrap; align-items:center; margin-bottom:.6rem; }
.pl-nav { display:flex; gap:.4rem; align-items:center; }
.pl-titre { font-size:1.05rem; margin-left:.5rem; }
.pl-outils { display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.pl-filtres { display:flex; gap:.35rem; align-items:center; }
.pl-filtres select, .pl-filtres input, .form-mini { border:1px solid #e2e8f0; border-radius:8px; padding:.4rem .5rem; font-size:.8rem; font-family:inherit; background:#fff; }
.pl-legende { display:flex; gap:.7rem; flex-wrap:wrap; align-items:center; margin:.4rem 0 .8rem; font-size:.75rem; color:#475569; }
.pl-leg-item { display:flex; gap:.3rem; align-items:center; margin:0; }
.pl-leg-item i { width:12px; height:12px; border-radius:3px; display:inline-block; }
.pl-leg-item input[type=color] { width:18px; height:18px; border:none; padding:0; background:none; cursor:pointer; }
.pl-grille { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.pl-tete { text-align:center; font-weight:800; font-size:.72rem; color:#94a3b8; text-transform:uppercase; padding:.2rem 0; }
.pl-cell { background:#fff; border:1px solid #e2e8f0; border-radius:10px; min-height:96px; padding:4px; font-size:.72rem; overflow:hidden; }
.pl-sem .pl-cell { min-height:220px; }
.pl-auj { border-color:var(--primary); box-shadow:0 0 0 1px var(--primary); }
.pl-ferie { background:#fef2f2; } .pl-vac { background:#fffbeb; }
.pl-num { font-weight:800; color:#334155; margin-bottom:2px; }
.pl-tag-ferie { font-size:.6rem; color:#dc2626; font-weight:600; }
.pl-tag-vac { font-size:.6rem; color:#d97706; font-weight:600; }
.pl-ev { color:#fff; border-radius:6px; padding:2px 5px; margin:2px 0; cursor:pointer; display:flex; gap:4px; align-items:center; line-height:1.25; }
.pl-ev a { color:#fff; text-decoration:none; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.pl-ev .pl-ini { font-size:.62rem; opacity:.9; font-weight:700; }
.pl-prov { opacity:.75; border:1px dashed rgba(255,255,255,.9); }
.pl-badge-prov { font-size:.58rem; background:rgba(255,255,255,.25); border-radius:4px; padding:0 3px; }
.pl-resa { background:#0f172a; }
.pl-check { cursor:pointer; font-size:.7rem; width:13px; text-align:center; opacity:.9; }
.pl-check.ok { color:#4ade80; font-weight:900; }
.pl-res-grille { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:.6rem; }
.pl-modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:600; align-items:center; justify-content:center; padding:1rem; }
.pl-modal-int { background:#fff; border-radius:14px; padding:1.1rem; width:min(560px,100%); max-height:min(92vh, 92dvh); overflow:auto; box-shadow:0 25px 60px rgba(15,23,42,.35); }
.pl-types { display:flex; gap:.35rem; flex-wrap:wrap; margin-bottom:.6rem; }
.pl-type input { display:none; }
.pl-type span { display:inline-block; padding:.3rem .55rem; border-radius:999px; font-size:.72rem; font-weight:700; border:2px solid var(--c); color:var(--c); cursor:pointer; }
.pl-type input:checked + span { background:var(--c); color:#fff; }
.pl-champs { display:grid; gap:.5rem; font-size:.82rem; }
.pl-champs label { display:grid; gap:.2rem; font-weight:600; color:#334155; }
.pl-champs input, .pl-champs select { border:1px solid #e2e8f0; border-radius:8px; padding:.45rem .55rem; font-family:inherit; font-size:.82rem; }
.pl-ligne { display:flex; gap:.6rem; flex-wrap:wrap; align-items:end; }
.pl-inline { display:flex !important; flex-direction:row !important; gap:.35rem !important; align-items:center; font-weight:500 !important; }
.pl-inline input { width:auto; }
.pl-modal-btns { display:flex; gap:.4rem; margin-top:.9rem; flex-wrap:wrap; }
@media (max-width: 900px) {
  .pl-res-grille { grid-template-columns:1fr; }
  .pl-grille { gap:2px; } .pl-cell { min-height:72px; border-radius:6px; }
}
.pl-fgrille { display:grid; gap:4px; }
.pl-fnom { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:.5rem .6rem; font-weight:800; font-size:.78rem; display:flex; align-items:center; }

/* ========== PROSPECTION / CRM (v4.7) ========== */
.crm-grille { display:grid; grid-template-columns:340px 1fr; gap:1rem; align-items:start; }
.crm-carte { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:1rem; margin-bottom:1rem; }
.crm-timeline { display:grid; gap:.6rem; }
.crm-tl-item { display:flex; gap:.6rem; }
.crm-tl-ico { width:34px; height:34px; border-radius:50%; background:#f1f5f9; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.crm-tl-corps { flex:1; background:#f8fafc; border:1px solid #eef2f7; border-radius:10px; padding:.5rem .7rem; }
@media (max-width: 950px) { .crm-grille { grid-template-columns:1fr; } }
.pl-etat { display:inline-flex; gap:1px; margin-left:2px; }
.pl-etat i { font-style:normal; font-size:.6rem; opacity:.28; filter:grayscale(1); }
.pl-etat i.ok { opacity:1; filter:none; }

/* v4.8 : onglets Sessions + mode Etats */
.sess-onglets { display:flex; gap:.4rem; margin-bottom:.8rem; }
.sess-onglets .btn { font-size:.82rem; }
.pl-ev-etat { box-shadow:0 1px 3px rgba(15,23,42,.08); display:flex; justify-content:space-between; align-items:center; }
.pl-etat-g i { font-size:.85rem; }
.pl-cell { position:relative; }
.pl-plus { position:absolute; top:3px; right:5px; width:17px; height:17px; border-radius:6px; background:#f1f5f9;
  color:#94a3b8; font-weight:900; font-size:.8rem; line-height:16px; text-align:center; cursor:pointer; opacity:0; transition:.15s; }
.pl-cell:hover .pl-plus { opacity:1; }
.pl-plus:hover { background:var(--primary); color:#fff; }

/* ========== v5.2 : cartes sessions identiques au portail ========== */
.pl-fmt-tags { display:flex; flex-wrap:wrap; gap:2px; margin-bottom:3px; }
.pl-fmt-tag { font-size:.58rem; font-weight:700; padding:1px 5px; border-radius:4px; line-height:1.4; white-space:nowrap; }
.pl-sess { background:#fff; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.08); margin:3px 0; padding:5px 6px;
  border-left:4px solid var(--primary); cursor:pointer; position:relative; transition:.2s; overflow:hidden; }
.pl-sess:hover { box-shadow:0 3px 8px rgba(0,0,0,.14); transform:translateY(-1px); }
.pl-sess.pl-vu { opacity:.82; }
.pl-sess-titre { font-weight:800; font-size:.66rem; color:#1e293b; line-height:1.25; }
.pl-sess-l2 { display:flex; align-items:center; gap:5px; flex-wrap:wrap; margin:1px 0; }
.pl-sess-ref { font-size:.55rem; color:#64748b; font-weight:600; }
.pl-sess-h { font-size:.52rem; color:#64748b; background:#f1f5f9; padding:1px 4px; border-radius:3px; font-weight:600; }
.pl-sess-fmt { font-size:.58rem; color:#475569; font-weight:600; }
.pl-sess-fmt i { font-size:.5rem; color:#94a3b8; }
.pl-sess-helper { display:inline-flex; align-items:center; gap:3px; font-size:.55rem; font-weight:700; color:#92400e;
  background:#fef3c7; border:1px dashed #f59e0b; border-radius:5px; padding:1px 5px; margin:1px 2px 1px 0; }
.pl-helper-x { cursor:pointer; font-weight:900; color:#b45309; padding:0 2px; }
.pl-helper-x:hover { color:#dc2626; }
.pl-helper-add { position:absolute; top:4px; right:5px; font-size:.55rem; color:#cbd5e1; cursor:pointer; }
.pl-sess:hover .pl-helper-add { color:var(--primary); }
.pl-sess-lieu { display:block; font-size:.55rem; color:#0369a1; text-decoration:none; margin:1px 0; line-height:1.35; }
.pl-sess-lieu:hover { text-decoration:underline; }
.pl-comps { display:flex; flex-direction:column; gap:2px; margin-top:3px; }
.pl-comp { display:flex; align-items:center; gap:5px; border-radius:5px; padding:2px 6px; color:#fff; min-height:20px; }
.pl-comp-ico { font-size:.6rem; flex-shrink:0; }
.pl-comp-inf { display:flex; flex-direction:column; min-width:0; line-height:1.15; }
.pl-comp-nom { font-size:.56rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 1px rgba(0,0,0,.15); }
.pl-comp-nb { font-size:.5rem; opacity:.92; font-weight:600; }
.pl-check-row { margin-top:3px; }
.pl-check-lbl { display:inline-flex; align-items:center; gap:4px; font-size:.55rem; font-weight:700; color:#16a34a; cursor:pointer; }
.pl-check-lbl input { width:11px; height:11px; accent-color:#16a34a; cursor:pointer; }
.pl-evt { display:flex; align-items:center; gap:4px; background:#fff; border-radius:5px; box-shadow:0 1px 2px rgba(0,0,0,.07);
  padding:2px 5px; margin:2px 0; font-size:.58rem; cursor:pointer; }
.pl-evt-ico { font-size:.6rem; flex-shrink:0; }
.pl-evt-titre { flex:1; min-width:0; color:#1e293b; font-weight:600; line-height:1.3; }
.pl-evt-attr { display:block; font-weight:400; font-size:.62rem; color:#475569; }
.pl-evt-h { font-size:.5rem; color:#64748b; background:#f1f5f9; padding:1px 4px; border-radius:3px; flex-shrink:0; font-weight:600; }
.pl-evt.pl-prov { border:1px dashed #f59e0b; background:#fffbeb; }
.pl-cell { min-height:110px; }
.pl-sem .pl-cell { min-height:240px; }

/* ========== v5.6 : Programmes (visuel du portail) + Services ========== */
.prog-header { background:linear-gradient(135deg,#6366F1,#8b5cf6); color:#fff; border-radius:16px; padding:1.6rem 2rem; margin-bottom:1.2rem; }
.prog-header h2 { margin:0; font-size:1.35rem; } .prog-header p { margin:.35rem 0 0; opacity:.9; font-size:.9rem; }
.prog-actions { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; }
.prog-cat-section { margin-bottom:1.6rem; }
.prog-cat-titre { font-size:1.02rem; color:#334155; border-bottom:2px solid #e2e8f0; padding-bottom:.4rem; }
.prog-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:1.1rem; }
.prog-card { background:#fff; border:1px solid #e2e8f0; border-radius:16px; overflow:hidden; transition:all .3s ease; display:flex; flex-direction:column; }
.prog-card:hover { transform:translateY(-4px); box-shadow:0 8px 30px rgba(0,0,0,.12); }
.prog-card.prog-cachee { opacity:.62; }
.prog-card-header { background:linear-gradient(135deg,#f8fafc,#f1f5f9); padding:1.2rem 1.4rem; border-bottom:1px solid #e2e8f0; display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.prog-card-header h3 { margin:0 0 .35rem; color:#1a202c; font-size:1.05rem; font-weight:700; }
.prog-categorie { background:#eef2ff; color:#4338ca; font-size:.7rem; font-weight:700; padding:2px 9px; border-radius:20px; margin-right:4px; }
.prog-duree { background:#fff; border:1px solid #e2e8f0; color:#475569; font-size:.75rem; font-weight:700; padding:4px 10px; border-radius:20px; white-space:nowrap; }
.prog-card-body { padding:1rem 1.4rem; flex:1; }
.prog-section { margin-bottom:.8rem; }
.prog-section h4 { margin:0 0 .2rem; font-size:.8rem; color:#4f46e5; }
.prog-section p { margin:0; font-size:.82rem; color:#475569; line-height:1.45; }
.prog-card-actions { padding: .8rem 1.4rem; border-top:1px solid #f1f5f9; display:flex; gap:6px; flex-wrap:wrap; }
.prog-card-actions .btn { font-size:.75rem; padding:6px 10px; }
.prog-vide { text-align:center; padding:3rem; color:#64748b; }
.prog-vide-ico { font-size:3rem; color:#cbd5e1; margin-bottom:.6rem; }
.prog-modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,.55); z-index:200; align-items:flex-start; justify-content:center; padding:4vh 12px; overflow:auto; }
.prog-modal-box { background:#fff; border-radius:16px; padding:1.4rem; width:100%; max-width:720px; max-height:min(90vh, 90dvh); overflow:auto; }
.prog-modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:.8rem; }
.prog-modal-head h3 { margin:0; font-size:1.05rem; }
.prog-modal-x { cursor:pointer; font-size:1.6rem; color:#94a3b8; line-height:1; }
.form-2col { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; }
@media (max-width:640px){ .form-2col { grid-template-columns:1fr; } }
.mod-ligne { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:.5rem .2rem; border-bottom:1px solid #f1f5f9; }

/* ========== v5.7 : catalogue pre-reservation (visuel client_dashboard) ========== */
.pr-section-header h2 { margin:0; font-size:1.15rem; } .pr-section-header p { margin:.2rem 0 .8rem; color:#64748b; font-size:.85rem; }
.pr-search-in { position:relative; margin-bottom:.8rem; }
.pr-search-in i.fa-search { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#94a3b8; }
.pr-search-in input { width:100%; padding:12px 40px; border:1px solid #e2e8f0; border-radius:12px; font-size:.9rem; }
.pr-search-x { position:absolute; right:10px; top:50%; transform:translateY(-50%); border:0; background:none; color:#94a3b8; cursor:pointer; }
.pr-tags { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:.8rem; }
.pr-tag { display:inline-flex; align-items:center; gap:6px; border:1px solid #e2e8f0; background:#fff; border-radius:24px; padding:7px 14px; font-size:.78rem; font-weight:600; color:#475569; cursor:pointer; transition:.2s; }
.pr-tag:hover { border-color:var(--tagc,#6366F1); color:var(--tagc,#6366F1); }
.pr-tag.active { background:var(--tagc,#6366F1); border-color:var(--tagc,#6366F1); color:#fff; }
.pr-results { display:flex; justify-content:space-between; align-items:center; background:#eef2ff; border-radius:10px; padding:8px 14px; font-size:.82rem; color:#4338ca; margin-bottom:.8rem; }
.pr-reset { border:0; background:none; color:#6366F1; font-weight:700; cursor:pointer; font-size:.8rem; }
.pr-cat { margin-bottom:1rem; }
.pr-cat-head { display:flex; justify-content:space-between; align-items:center; background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:.9rem 1.2rem; cursor:pointer; }
.pr-cat-left { display:flex; align-items:center; gap:12px; }
.pr-cat-ico { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.15rem; }
.pr-cat-head h3 { margin:0; font-size:1rem; } .pr-cat-meta { font-size:.75rem; color:#94a3b8; }
.pr-cat-right { display:flex; align-items:center; gap:10px; }
.pr-cat-badge { font-size:.72rem; font-weight:700; padding:4px 10px; border-radius:16px; }
.pr-cat-body { padding-top:.8rem; } .pr-cat.pr-plie .pr-cat-body { display:none; }
.pr-cat.pr-plie .pr-cat-right .fa-chevron-down { transform:rotate(-90deg); }
.pr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1rem; }
.pr-card { position:relative; background:#fff; border:1px solid #e2e8f0; border-radius:16px; overflow:hidden; cursor:pointer; transition:.25s; }
.pr-card:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(0,0,0,.1); }
.pr-badge { position:absolute; top:10px; right:10px; z-index:2; font-size:.62rem; font-weight:800; padding:3px 8px; border-radius:12px; color:#fff; }
.pr-badge-urgent { background:#ef4444; } .pr-badge-soon { background:#f59e0b; }
.pr-card-head { height:64px; display:flex; align-items:center; padding:0 1.1rem; }
.pr-card-ico { width:42px; height:42px; border-radius:12px; color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.1rem; }
.pr-card-body { padding: .8rem 1.1rem .4rem; }
.pr-card-body h4 { margin:0 0 .3rem; font-size:.92rem; line-height:1.3; }
.pr-card-desc { margin:0 0 .5rem; font-size:.76rem; color:#64748b; }
.pr-card-tags { display:flex; gap:6px; flex-wrap:wrap; }
.pr-ctag { font-size:.68rem; font-weight:700; color:#475569; background:#f1f5f9; border-radius:12px; padding:3px 8px; }
.pr-card-foot { display:flex; justify-content:space-between; align-items:center; padding:.6rem 1.1rem .9rem; }
.pr-next-lbl { display:block; font-size:.62rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.4px; }
.pr-next-date { font-size:.8rem; font-weight:700; color:#1e293b; }
.pr-card-fleche { color:#94a3b8; transition:.25s; }
.pr-card.pr-ouverte .pr-card-fleche { transform:rotate(180deg); }
.pr-sessions { display:none; border-top:1px solid #f1f5f9; padding:.5rem .9rem .8rem; background:#f8fafc; }
.pr-card.pr-ouverte .pr-sessions { display:block; }
.pr-sess { display:flex; justify-content:space-between; align-items:center; background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:.5rem .7rem; margin-top:.45rem; }
.pr-sess-urgent { border-color:#fecaca; }
.pr-sess-left { display:flex; align-items:center; gap:10px; min-width:0; }
.pr-sess-date { width:44px; text-align:center; background:#eef2ff; border-radius:8px; padding:4px 0; flex-shrink:0; }
.pr-sess-j { display:block; font-size:1rem; font-weight:800; color:#4338ca; line-height:1.1; }
.pr-sess-m { display:block; font-size:.62rem; color:#6366F1; text-transform:uppercase; }
.pr-sess-info { display:flex; flex-direction:column; font-size:.72rem; color:#475569; min-width:0; }
.pr-sess-info span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pr-sess-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.pr-sess-places { font-size:.7rem; font-weight:800; color:#16a34a; background:#f0fdf4; border-radius:10px; padding:3px 8px; }
.pr-sess-places.peu { color:#dc2626; background:#fef2f2; }
.pr-plus { width:30px; height:30px; border-radius:50%; border:0; background:var(--primary); color:#fff; cursor:pointer; font-size:.8rem; }
.pr-plus:hover { transform:scale(1.1); }
.pr-modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,.55); z-index:220; align-items:flex-start; justify-content:center; padding:4vh 12px; overflow:auto; }
.pr-modal-box { background:#fff; border-radius:16px; padding:1.3rem; width:100%; max-width:560px; max-height:min(90vh, 90dvh); overflow:auto; }
.pr-modal-head { display:flex; justify-content:space-between; align-items:center; }
.pr-modal-head h3 { margin:0; font-size:1rem; }
.pr-modal-x { cursor:pointer; font-size:1.6rem; color:#94a3b8; line-height:1; }
.pr-modal-resume { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:.6rem .9rem; font-size:.82rem; margin: .7rem 0; }

/* ========== v5.8 : messages popup espace client ========== */
.pm-overlay { display:flex; position:fixed; inset:0; background:rgba(15,23,42,.6); z-index:300; align-items:center; justify-content:center; padding:16px; }
.pm-box { background:#fff; border-radius:18px; padding:1.8rem; max-width:460px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.3); animation:pmIn .25s ease; }
@keyframes pmIn { from { transform:scale(.92); opacity:0; } to { transform:scale(1); opacity:1; } }
.pm-ico { width:56px; height:56px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.6rem; margin:0 auto .8rem; }
.pm-box h3 { margin:0 0 .5rem; font-size:1.1rem; }
.pm-box p { color:#475569; font-size:.9rem; line-height:1.5; }
.pm-box .btn { border:0; color:#fff; margin-top:.6rem; }

/* ========== v5.9 : dashboard client (quick-cards, suivi, programmes) ========== */
.pr-breadcrumb { display:flex; align-items:center; gap:10px; font-size:.82rem; color:#94a3b8; margin-bottom:1rem; }
.pr-breadcrumb a { color:#6366F1; text-decoration:none; font-weight:600; }
.pr-breadcrumb span { color:#334155; font-weight:600; }
.quick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1rem; margin-bottom:2rem; }
.quick-card { background:#fff; border:1px solid #e2e8f0; border-radius:16px; text-decoration:none; color:inherit; position:relative; overflow:hidden; transition:all .3s ease; display:flex; flex-direction:column; }
.quick-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; }
.qc-vert::before { background:linear-gradient(90deg,#10b981,#34D399); } .qc-bleu::before { background:linear-gradient(90deg,#3b82f6,#60a5fa); }
.qc-violet::before { background:linear-gradient(90deg,#8b5cf6,#a78bfa); } .qc-indigo::before { background:linear-gradient(90deg,#6366f1,#818cf8); }
.qc-cyan::before { background:linear-gradient(90deg,#0ea5e9,#38bdf8); }
.quick-card:hover { transform:translateY(-4px); box-shadow:0 10px 30px rgba(0,0,0,.1); }
.qc-top { display:flex; align-items:center; gap:12px; padding:1.2rem 1.2rem .8rem; }
.qc-icon { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0; }
.qc-content h4 { margin:0 0 .2rem; font-size:.95rem; } .qc-content p { margin:0; font-size:.76rem; color:#64748b; }
.qc-fleche { margin-left:auto; color:#cbd5e1; }
.quick-card:hover .qc-fleche { color:#6366F1; transform:translateX(3px); }
.qc-foot { border-top:1px solid #f1f5f9; padding:.6rem 1.2rem; font-size:.76rem; margin-top:auto; }
.qc-foot-col { display:flex; flex-direction:column; gap:.35rem; }
.qc-stat { color:#475569; font-weight:600; }
.sv-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-bottom:1rem; }
.sv-box { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:.8rem; text-align:center; cursor:pointer; transition:.2s; }
.sv-box:hover, .sv-box.sv-actif { border-color:#6366F1; box-shadow:0 4px 14px rgba(99,102,241,.15); }
.sv-num { font-size:1.5rem; font-weight:800; color:#1e293b; } .sv-lbl { font-size:.72rem; color:#64748b; font-weight:600; }
.sv-rouge .sv-num { color:#ef4444; } .sv-orange .sv-num { color:#f59e0b; } .sv-vert .sv-num { color:#10b981; }
.sv-card { background:#fff; border:1px solid #e2e8f0; border-radius:14px; margin-bottom:.6rem; overflow:hidden; }
.sv-card-head { display:flex; justify-content:space-between; align-items:center; padding:.8rem 1.1rem; cursor:pointer; list-style:none; }
.sv-card-head::-webkit-details-marker { display:none; }
.sv-id { display:flex; align-items:center; gap:10px; }
.sv-avatar { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.85rem; flex-shrink:0; }
.sv-badge { font-size:.68rem; font-weight:800; padding:4px 10px; border-radius:14px; white-space:nowrap; }
.sv-card-body { padding: .2rem 1.1rem 1rem; border-top:1px solid #f1f5f9; }
.pgc-cat { margin-bottom:1.4rem; }
.pgc-cat-head { display:flex; justify-content:space-between; align-items:center; background:#fff; border:1px solid #e2e8f0; border-left:4px solid #6366F1; border-radius:10px; padding:.7rem 1rem; margin-bottom:.7rem; }
.pgc-cat-head h3 { margin:0; font-size:.98rem; }
.pgc-count { font-size:.72rem; font-weight:700; color:#64748b; background:#f1f5f9; border-radius:14px; padding:3px 10px; }
.pgc-item { display:flex; justify-content:space-between; gap:14px; background:#fff; border:1px solid #e2e8f0; border-left:4px solid #6366F1; border-radius:12px; padding: .9rem 1.1rem; margin-bottom:.6rem; }
.pgc-titre h4 { margin:0 0 .25rem; font-size:.92rem; }
.pgc-meta { display:flex; gap:12px; font-size:.74rem; color:#64748b; font-weight:600; flex-wrap:wrap; }
.pgc-desc { font-size:.8rem; color:#475569; margin-top:.4rem; }
.pgc-details { font-size:.73rem; color:#94a3b8; margin-top:.3rem; }
.pgc-actions { display:flex; flex-direction:column; gap:6px; justify-content:center; flex-shrink:0; }
.pgc-pdf { display:flex; align-items:center; gap:8px; color:#fff; border-radius:10px; padding:8px 14px; font-size:.78rem; font-weight:700; text-decoration:none; }
.pgc-pdf:hover { filter:brightness(1.08); }
@media (max-width:640px){ .pgc-item { flex-direction:column; } .pgc-actions { flex-direction:row; } }

/* v5.98 : en PWA installee (agenda), le lien « <- Sessions » (planning desktop) est masque —
   seul le bouton <- Retour global reste, plus de double bouton qui porte a confusion */
@media (display-mode: standalone) { .lnk-sessions { display: none !important; } }
