/* =====================================================================
   KatCore — Feuille de style (sobre & professionnelle)
   Palette : Blanc · Noir · Gris · Parme (un seul accent)
   -------------------------------------------------------------------
   Principe : neutres partout, le parme uniquement sur les éléments
   actifs (bouton principal, lien, onglet actif, focus). Pas de
   dégradés, une seule ombre, peu de nuances. Classes historiques
   conservées : aucun template PHP impacté.
   ===================================================================== */

/* 1. JETONS --------------------------------------------------------- */
:root{
  --blanc:#FFFFFF;
  --ink:#1F242C;            /* texte principal / titres */
  --muted:#6B7280;          /* texte secondaire */
  --faint:#9AA1AC;          /* icônes discrètes */
  --border:#E5E7EB;         /* bordures */
  --bg:#F6F7F9;             /* fond de l'application */
  --surface:#FFFFFF;        /* cartes, tableaux */
  --surface-2:#F3F4F6;      /* fonds neutres (hover) */
  --gris:#66605A;           /* gris foncé (bordures des tableaux) */
  --gris-2:#BABBBC;         /* gris moyen (en-têtes des tableaux) */

  --accent:#7A6AA6;         /* parme (accent unique) */
  --accent-dark:#5F5188;    /* survol / actif */
  --accent-soft:#F1EFF6;    /* fond clair d'accent (sélection, actif) */

  --ok:#2E7D5B; --danger:#C0392B; --warn:#B7791F;

  --side:#1C2027;           /* menu latéral (anthracite) */
  --side-ink:#C7CBD3;
  --side-muted:#868C97;

  --radius:12px; --radius-sm:8px;
  --shadow:0 1px 2px rgba(16,20,27,.06), 0 2px 8px rgba(16,20,27,.05);
  --shadow-pop:0 8px 28px rgba(16,20,27,.16);
  --font:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --t:.15s ease;
  color-scheme:light;
}

/* 2. BASE ----------------------------------------------------------- */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{ font-family:var(--font); color:var(--ink); font-size:15px; line-height:1.55;
  background:var(--bg); -webkit-font-smoothing:antialiased; }
a{ color:var(--accent); text-decoration:none; }
a:hover{ color:var(--accent-dark); }
h1,h2,h3{ margin:0 0 .4em; color:var(--ink); font-weight:600; }
img{ max-width:100%; }
::selection{ background:var(--accent-soft); }

/* 3. MISE EN PAGE --------------------------------------------------- */
.app{ display:flex; min-height:100vh; }

.sidebar{ width:230px; background:var(--side); color:var(--side-ink); display:flex; flex-direction:column;
  position:fixed; inset:0 auto 0 0; z-index:40; transform:translateX(-100%); transition:transform var(--t); }
.sidebar.open{ transform:translateX(0); }
.brand{ display:flex; align-items:center; justify-content:center; padding:16px 14px; background:var(--gris); }
.brand-logo-long{ width:100%; max-width:168px; height:auto; display:block; background:var(--blanc); border-radius:10px; padding:9px 11px; }
.brand-logo-img{ width:38px; height:38px; border-radius:50%; object-fit:cover; background:var(--blanc); }

.nav{ flex:1 1 auto; overflow-y:auto; padding:10px; display:flex; flex-direction:column; justify-content:center; }
.nav-link{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:8px;
  color:var(--side-ink); font-weight:500; font-size:14.5px; margin-bottom:2px; transition:background var(--t), color var(--t); }
.nav-link:hover{ background:var(--blanc); color:var(--gris); }
.nav-link.active{ background:var(--accent); color:var(--blanc); font-weight:600; }
.nav-ico{ width:22px; text-align:center; font-size:16px; flex:none; }
.nav-txt{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-group > summary{ list-style:none; cursor:pointer; gap:10px; }
.nav-group > summary::-webkit-details-marker{ display:none; }
.nav-caret{ display:inline-block; width:12px; text-align:center; font-size:10px; transition:transform var(--t); opacity:.7; }
.nav-group[open] > summary .nav-caret{ transform:rotate(90deg); }
.nav-sub{ display:flex; flex-direction:column; margin:2px 0 6px 14px; padding-left:6px; border-left:1px solid rgba(255,255,255,.08); }
.nav-link.sub{ padding:8px 12px 8px 16px; font-size:13.5px; color:var(--side-muted); font-weight:500; }
.nav-link.sub:hover{ background:var(--blanc); color:var(--gris); }
.nav-link.sub.active{ background:rgba(255,255,255,.10); color:var(--blanc); }

.sidebar-foot{ margin-top:auto; padding:14px 16px; background:var(--blanc); border-top:1px solid var(--border); }
.user{ font-weight:600; color:var(--ink); display:flex; flex-direction:column; font-size:14px; }
.user small{ font-weight:400; color:var(--muted); font-size:12px; margin-top:2px; text-transform:capitalize; }
.btn-logout{ display:inline-block; margin-top:10px; color:var(--danger); font-weight:500; font-size:13px; padding:5px 9px; border-radius:6px; }
.btn-logout:hover{ background:#F7E7E5; color:#A5322A; }

.main{ flex:1; display:flex; flex-direction:column; min-width:0; padding-bottom:64px; }
.topbar{ display:flex; align-items:center; gap:12px; background:var(--gris); border-bottom:1px solid var(--gris);
  padding:12px 20px; position:sticky; top:0; z-index:30; }
.burger{ border:0; background:none; font-size:22px; cursor:pointer; color:var(--blanc); padding:2px 6px; }
.page-title{ font-size:15px; margin:0; flex:1; text-align:center; text-transform:uppercase; letter-spacing:.05em; color:var(--blanc); font-weight:600; }
.content{ padding:22px 20px; max-width:1220px; width:100%; margin:0 auto; }

.bottomnav{ position:fixed; bottom:0; left:0; right:0; display:flex; background:var(--surface); border-top:1px solid var(--border); z-index:35; }
.bottomnav a{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:9px 0 8px; font-size:19px; color:var(--faint); }
.bottomnav a span{ font-size:10px; font-weight:500; }
.bottomnav a.active{ color:var(--accent); }

/* 4. CARTES & GRILLES ----------------------------------------------- */
.grid{ display:grid; gap:16px; }
.grid.cols-2{ grid-template-columns:repeat(2,1fr); }
.grid.cols-3{ grid-template-columns:repeat(3,1fr); }
.grid.cols-4{ grid-template-columns:repeat(4,1fr); }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); }
.kpi{ display:flex; flex-direction:column; gap:5px; }
.kpi .val{ font-size:27px; font-weight:600; color:var(--ink); line-height:1.1; }
.kpi .lbl{ color:var(--muted); font-size:13px; }
.kpi .ico{ font-size:20px; }
.section-head{ display:flex; align-items:center; justify-content:space-between; margin:26px 0 14px; }
.section-head h2{ font-size:16px; margin:0; }
.muted{ color:var(--muted); }

/* 5. TABLEAUX ------------------------------------------------------- */
.table-wrap{ border:1px solid var(--gris); border-radius:var(--radius); overflow:auto; background:var(--surface); box-shadow:var(--shadow); }
table{ width:100%; border-collapse:collapse; font-size:14px; background:var(--surface); }
th,td{ padding:11px 14px; text-align:center; white-space:nowrap; border-right:1px solid var(--gris); border-bottom:1px solid var(--gris); }
tr th:last-child, tr td:last-child{ border-right:0; }
th{ background:var(--gris-2); color:var(--ink); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.03em; text-align:center; position:relative; }
tbody tr:last-child td{ border-bottom:0; }
tbody tr:hover{ background:var(--surface-2); }
/* Bouton crayon « modifier les colonnes » */
.cols-toggle{ font-size:15px; line-height:1; padding:6px 10px; }
/* Cohérence : toutes les données de tableau sont centrées. */
.t-right{ text-align:center; }
.t-center{ text-align:center; }
.th-inner{ display:flex; align-items:center; justify-content:center; gap:6px; }
.col-filter-btn{ border:0; background:none; cursor:pointer; font-size:11px; color:var(--muted); opacity:.6; padding:0 2px; line-height:1; }
.col-filter-btn:hover,.col-filter-btn.active{ opacity:1; color:var(--accent); }
.col-filter-pop{ position:absolute; z-index:50; left:6px; margin-top:4px; text-align:left; text-transform:none; letter-spacing:0;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-pop); padding:10px; width:210px; }
.col-filter-pop input{ width:100%; }

/* 6. BADGES (une couleur par état, discrètes) ---------------------- */
.badge{ display:inline-flex; align-items:center; padding:3px 10px; border-radius:6px; font-size:12px; font-weight:600; border:1px solid transparent; }
.badge.ok{ background:#EAF5EF; color:var(--ok); }
.badge.info{ background:var(--accent-soft); color:var(--accent-dark); }
.badge.warn{ background:#FBF3E3; color:var(--warn); }
.badge.muted{ background:var(--surface-2); color:var(--muted); border-color:var(--border); }
.badge.danger{ background:#FBECEA; color:var(--danger); }

/* 7. BOUTONS -------------------------------------------------------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:9px 15px; border-radius:var(--radius-sm);
  border:1px solid var(--accent); background:var(--accent); color:var(--blanc); font-size:14px; font-weight:500;
  font-family:var(--font); cursor:pointer; text-decoration:none; transition:background var(--t), border-color var(--t); }
.btn:hover{ background:var(--accent-dark); border-color:var(--accent-dark); color:var(--blanc); }
.btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.btn.ghost{ background:var(--surface); color:var(--ink); border-color:var(--border); }
.btn.ghost:hover{ background:var(--surface-2); border-color:var(--faint); color:var(--ink); }
.btn.modifier{ background:var(--accent); color:var(--blanc); border-color:var(--accent); }
.btn.modifier:hover{ background:var(--accent-dark); border-color:var(--accent-dark); }
.btn.danger{ background:var(--danger); color:var(--blanc); border-color:var(--danger); }
.btn.danger:hover{ background:#A5322A; border-color:#A5322A; }
.btn.sm{ padding:6px 10px; font-size:13px; }
.btn-row{ display:flex; gap:9px; flex-wrap:wrap; }

/* 8. FORMULAIRES ---------------------------------------------------- */
form .field{ margin-bottom:15px; }
label{ display:block; font-size:13px; font-weight:500; margin-bottom:6px; color:var(--ink); }
input,select,textarea{ width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:15px; font-family:var(--font); background:var(--blanc); color:var(--ink); transition:border-color var(--t), box-shadow var(--t); }
input::placeholder,textarea::placeholder{ color:var(--faint); }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(122,106,166,.18); }
input:disabled,select:disabled,textarea:disabled{ background:var(--surface-2); color:var(--muted); cursor:not-allowed; }
fieldset:disabled input,fieldset:disabled select,fieldset:disabled textarea{ background:var(--surface-2); cursor:not-allowed; }
textarea{ min-height:86px; resize:vertical; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.form-grid .full{ grid-column:1/-1; }
.form-narrow{ max-width:880px; }
fieldset{ border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin:0 0 20px; background:var(--surface); }
legend{ font-weight:600; padding:0 8px; color:var(--ink); font-size:14px; }
.hint{ font-size:12px; color:var(--muted); margin-top:5px; }
.checkbox{ display:flex; align-items:center; gap:9px; }
.checkbox input{ width:auto; }
input[type=checkbox],input[type=radio]{ width:auto; flex:none; accent-color:var(--accent); cursor:pointer; }

/* 9. DIVERS --------------------------------------------------------- */
.flash{ padding:11px 15px; border-radius:var(--radius-sm); margin-bottom:16px; font-size:14px; border:1px solid transparent; }
.flash-success{ background:#EAF5EF; border-color:#BFE3CF; color:#1E6B45; }
.flash-error{ background:#FBECEA; border-color:#F0C7C2; color:#8F2820; }
.flash-info{ background:var(--accent-soft); border-color:#DBD4EA; color:var(--accent-dark); }
.dl{ display:grid; grid-template-columns:180px 1fr; gap:10px 18px; font-size:14px; }
.dl dt{ color:var(--muted); font-weight:500; }
.dl dd{ margin:0; }
.empty{ text-align:center; color:var(--muted); padding:42px 16px; }
.empty .big{ font-size:32px; display:block; margin-bottom:8px; opacity:.5; }
.toolbar{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.toolbar .search{ flex:1; min-width:200px; }
.toolbar form{ display:flex; gap:9px; flex:1; flex-wrap:wrap; }

/* 10. AUTH ---------------------------------------------------------- */
.auth{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; background:#000000; position:relative; }
.auth .frame{ --oct:88px; width:100%; max-width:420px; margin:auto; padding:2px; background:var(--accent);
   clip-path:polygon(var(--oct) 0, calc(100% - var(--oct)) 0, 100% var(--oct), 100% calc(100% - var(--oct)), calc(100% - var(--oct)) 100%, var(--oct) 100%, 0 calc(100% - var(--oct)), 0 var(--oct));
   box-shadow:var(--shadow-pop); }
.auth .box{ background:var(--surface); padding:52px 44px 44px; width:100%; text-align:center; --oct:86px;
   clip-path:polygon(var(--oct) 0, calc(100% - var(--oct)) 0, 100% var(--oct), 100% calc(100% - var(--oct)), calc(100% - var(--oct)) 100%, var(--oct) 100%, 0 calc(100% - var(--oct)), 0 var(--oct)); }
.auth .box label{ display:block; text-align:center; color:var(--muted); font-weight:400; margin-bottom:6px; }
.auth .box .field{ margin-bottom:15px; }
.auth .box .field > input{ width:74%; margin:0 auto; display:block; }
.auth .box .pw-line{ position:relative; width:74%; margin:0 auto; }
.auth .box .pw-line .pw-wrap, .auth .box .pw-line .pw-wrap input{ width:100%; }
.auth .box input{ background:var(--surface-2); text-align:center; border-color:transparent; }
.auth .box input:focus{ background:var(--surface); }
.auth .box .send-btn{ position:absolute; left:100%; top:0; height:100%; margin-left:10px; width:38px; display:flex; align-items:center; justify-content:center; border:0; background:none; color:var(--accent); cursor:pointer; padding:0; }
.auth .box .send-btn:hover{ color:var(--accent-dark); }
.auth-brand-uky{ position:absolute; left:24px; bottom:18px; height:26px; width:auto; opacity:.8; }
.auth-brand-dkt{ position:absolute; right:24px; bottom:14px; height:50px; width:50px; border-radius:50%; object-fit:cover; }
.auth .box form .btn{ display:flex; width:74%; margin:8px auto 0; justify-content:center; }
.auth-tagline{ position:absolute; left:0; right:0; bottom:26px; text-align:center; color:#E9E9EC; font-weight:600; font-size:14px; }
.auth .box h1{ text-align:center; color:var(--ink); }
.auth .logo{ text-align:center; font-size:40px; margin-bottom:6px; }
.auth .logo-img{ display:block; width:170px; height:auto; max-width:80%; margin:0 auto 16px; object-fit:contain; }
.pw-wrap{ position:relative; }
.pw-wrap input{ padding-right:44px; }
.pw-toggle{ position:absolute; top:50%; right:6px; transform:translateY(-50%); border:0; background:none; cursor:pointer; font-size:18px; padding:4px 6px; line-height:1; color:var(--muted); }
.pw-toggle:hover{ color:var(--accent); }
.auth-links{ display:flex; justify-content:space-between; gap:10px; width:74%; margin:16px auto 0; font-size:14px; flex-wrap:wrap; }
.auth-links a{ color:var(--muted); font-style:italic; }
.auth-links a:hover{ color:var(--accent); }

/* 11. MÉDIA --------------------------------------------------------- */
.animal-photo{ width:100%; max-width:220px; aspect-ratio:1/1; object-fit:cover; border-radius:var(--radius); border:1px solid var(--border); }
.animal-thumb{ width:40px; height:40px; border-radius:50%; object-fit:cover; border:1px solid var(--border); vertical-align:middle; }
.photo-empty{ width:100%; max-width:220px; aspect-ratio:1/1; border-radius:var(--radius); border:1px dashed var(--border);
  display:flex; align-items:center; justify-content:center; font-size:40px; color:var(--faint); background:var(--surface-2); }
.lines th,.lines td{ white-space:normal; }
.lines input{ padding:8px 9px; }
.line-remove{ background:none; border:0; color:var(--danger); cursor:pointer; font-size:18px; }

/* 12. CALENDRIER ---------------------------------------------------- */
.cal{ display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.cal .dow{ text-align:center; font-size:11px; color:var(--muted); text-transform:uppercase; font-weight:600; padding:4px 0; }
.cal .day{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); min-height:80px; padding:5px; }
.cal .day.out{ background:var(--surface-2); color:var(--faint); }
.cal .day.today{ border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.cal .dnum{ font-size:12px; font-weight:600; color:var(--ink); }
.cal .ev{ display:block; font-size:11px; background:var(--accent-soft); color:var(--accent-dark); border-radius:4px; padding:2px 6px; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }

.day-agenda{ }
.slot{ display:flex; gap:12px; border-top:1px solid var(--border); padding:4px 0; align-items:flex-start; }
.slot:first-child{ border-top:0; }
.slot-time{ width:52px; flex:none; color:var(--muted); font-size:12px; font-weight:600; padding-top:5px; }
.slot.empty .slot-time{ opacity:.5; }
.slot-events{ flex:1; display:flex; flex-direction:column; gap:5px; min-height:20px; }
.ev-card{ background:var(--surface-2); border-left:3px solid var(--accent); border-radius:6px; padding:7px 10px; }
.ev-card .ev-title{ font-weight:500; font-size:13px; color:var(--ink); }
.ev-card .ev-meta{ color:var(--muted); font-size:12px; }
/* Bouton « ajouter un rendez-vous » sur un créneau de l'agenda */
.slot-add{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; margin-top:2px;
  border:1px dashed var(--border); border-radius:6px; color:var(--faint); font-size:15px; line-height:1; text-decoration:none;
  opacity:0; transition:opacity var(--t), color var(--t), border-color var(--t); }
.slot:hover .slot-add{ opacity:1; }
.slot-add:hover{ color:var(--accent); border-color:var(--accent); }

.cal-layout{ display:grid; grid-template-columns:260px 1fr; gap:18px; align-items:start; }
.cal-mini{ position:sticky; top:76px; }
.mini{ display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.mini-dow{ text-align:center; font-size:10px; color:var(--muted); font-weight:600; padding:2px 0; }
.mini-day{ position:relative; display:flex; align-items:center; justify-content:center; height:30px; border-radius:6px; color:var(--ink); font-size:13px; }
.mini-day:hover{ background:var(--surface-2); }
.mini-day.today{ box-shadow:inset 0 0 0 1px var(--accent); }
.mini-day.sel{ background:var(--accent); color:var(--blanc); font-weight:600; }
.mini-day .dot{ position:absolute; bottom:4px; width:4px; height:4px; border-radius:50%; background:var(--accent); }
.mini-day.sel .dot{ background:var(--blanc); }

/* 13. DASHBOARD (widgets) ------------------------------------------ */
.dash-tools{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-bottom:12px; }
.widgets-bar{ display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
#dash-widgets{ display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:120px; gap:14px; }
.widget{ grid-column:span var(--w,2); grid-row:span var(--h,1); background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow); display:flex; flex-direction:column; overflow:hidden; }
.widget.dragging{ opacity:.4; }
.widget-head{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 4px; padding:9px 12px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.widget-extra{ display:flex; align-items:center; gap:4px; flex-shrink:0; }
.widget-head h2{ font-size:13px; margin:0; flex:1 1 60px; min-width:60px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink); font-weight:600; }
.widget-tools{ display:flex; align-items:center; gap:1px; flex-shrink:0; margin-left:auto; }
.widget-tools button, .widget-tools .widget-drag{ border:0; background:none; cursor:pointer; color:var(--muted); opacity:.6; font-size:12px; font-weight:600; padding:2px 5px; line-height:1; border-radius:5px; }
.widget-tools button:hover{ opacity:1; background:rgba(16,20,27,.06); }
.widget-edit{ opacity:.85 !important; display:inline-flex; align-items:center; }
.widget-edit svg{ display:block; }
.widget.editing .widget-edit{ color:var(--accent); }
.widget-actions{ display:none; align-items:center; gap:1px; }
.widget.editing .widget-actions{ display:inline-flex; }
.widget.editing .widget-edit{ color:var(--accent); opacity:1; }
.widget-head h2.editable{ outline:1px dashed var(--accent); border-radius:4px; padding:0 4px; cursor:text; }
.widget-drag{ cursor:grab; font-size:14px; }
.widget-hide:hover{ color:var(--danger); opacity:1; }
.widget-body{ flex:1; overflow:auto; padding:12px; }
.widget-body .grid{ gap:8px; height:100%; }
.widget-body .card{ border:0; box-shadow:none; background:transparent; padding:6px; }
.widget-body .kpi .val{ font-size:22px; }
.widget-body .table-wrap{ border:0; box-shadow:none; }
.widget-note textarea{ width:100%; height:100%; min-height:0; border:1px solid var(--border); resize:none; }
.widget[data-widget="agenda"] .widget-body{ overflow:hidden; }
.widget[data-widget="agenda"] .day-agenda{ max-height:100%; overflow-y:auto; }

/* Menu « Ajouter un widget » */
.wadd{ position:relative; display:inline-block; }
.wadd-menu{ position:absolute; z-index:60; left:0; top:calc(100% + 4px); min-width:220px; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-pop); padding:6px; display:none; }
.wadd-menu.open{ display:block; }
.wadd-menu button{ display:flex; width:100%; align-items:center; gap:9px; padding:8px 10px; border:0; background:none; cursor:pointer;
  font:inherit; color:var(--ink); border-radius:6px; text-align:left; }
.wadd-menu button:hover{ background:var(--surface-2); }
.wadd-menu button[disabled]{ opacity:.45; cursor:default; }
.wadd-menu .wadd-empty{ padding:8px 10px; color:var(--muted); font-size:13px; }

/* Widget Audience (Matomo) */
.wa-analytics{ padding:4px 2px; }
.wa-kpis{ display:flex; gap:10px; }
.wa-kpi{ flex:1; text-align:center; background:var(--surface-2); border-radius:8px; padding:9px 4px; }
.wa-kpi b{ display:block; font-size:19px; color:var(--ink); }
.wa-kpi span{ font-size:11px; color:var(--muted); }
.wa-sub{ font-size:11px; color:var(--muted); margin:8px 2px 4px; }
.wa-spark{ display:flex; align-items:flex-end; gap:3px; height:40px; margin:4px 2px 10px; }
.wa-bar{ flex:1; background:var(--accent); border-radius:2px 2px 0 0; min-width:4px; opacity:.8; }
.wa-cols{ display:flex; gap:14px; }
.wa-cols h4{ margin:0 0 4px; font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); }
.wa-list{ list-style:none; margin:0; padding:0; font-size:12px; }
.wa-list li{ display:flex; justify-content:space-between; gap:8px; padding:3px 0; border-bottom:1px solid var(--border); }
.wa-list li span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wa-list li b{ color:var(--ink); }

/* Éditeur de balises (Taguer) */
.tp-para{ width:100%; border:0; border-bottom:1px solid var(--border); background:none; resize:none; overflow:hidden; font:inherit; color:var(--ink); padding:3px 0; }
.tp-para:focus{ outline:0; background:var(--surface-2); }

/* Page Tarifs */
.add-presta{ margin-bottom:16px; }
.presta-section{ margin-bottom:22px; }
.presta-section-head{ display:flex; align-items:center; gap:10px; margin:0 0 12px; }
.presta-section-head h2{ margin:0; font-size:16px; }
.presta-section-head .spacer{ flex:1; }
.presta-section table{ font-size:12.5px; }
.presta-section th,.presta-section td{ padding:8px 9px; white-space:normal; }
.presta-catalog{ max-height:230px; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px; margin-top:6px; background:var(--surface-2); }
.presta-cat-group{ margin-bottom:12px; }
.presta-cat-group:last-child{ margin-bottom:0; }
.presta-cat-title{ font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin-bottom:6px; }

/* Colonnes configurables / sélecteur */
th[data-col]{ position:relative; }
.col-resizer{ position:absolute; top:0; right:0; width:6px; height:100%; cursor:col-resize; user-select:none; }
.col-resizer:hover{ background:rgba(122,106,166,.28); }
.col-chooser{ background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow-pop); padding:6px; z-index:1000; min-width:210px; overflow:hidden; }
.col-chooser .cc-hint{ font-size:11px; color:var(--muted); padding:8px 10px 9px; margin-bottom:4px; border-bottom:1px solid var(--border); line-height:1.4; }
.col-chooser .cc-row{ display:flex; align-items:center; gap:10px; padding:8px 10px; font-size:13.5px; color:var(--ink); border-radius:8px; cursor:default; }
.col-chooser .cc-row:hover{ background:var(--surface-2); }
.col-chooser .cc-grip{ cursor:grab; color:var(--faint); font-size:13px; letter-spacing:-3px; user-select:none; }
.col-chooser .cc-lab{ display:flex; align-items:center; gap:9px; cursor:pointer; flex:1; font-weight:500; }
.col-chooser .cc-dragging{ opacity:.5; background:var(--surface-2); }

/* Autocomplétion adresse */
.addr-autocomplete{ position:relative; }
.addr-suggest{ display:none; position:absolute; top:100%; left:0; right:0; z-index:1000; background:var(--surface); border:1px solid var(--border); border-top:0; border-radius:0 0 8px 8px; box-shadow:var(--shadow-pop); max-height:230px; overflow:auto; }
.addr-item{ padding:9px 11px; font-size:13px; cursor:pointer; }
.addr-item:hover, .addr-item.active{ background:var(--surface-2); }

/* Panneau d'édition des widgets */
.widget-editbar{ display:none; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:7px 9px; margin-bottom:8px; background:var(--surface-2); border:1px solid var(--border); border-radius:8px; font-size:12px; }
.widget-editbar .we-lbl{ color:var(--ink); font-weight:600; }
.widget-editbar .we-cs{ border:1px solid var(--border); background:var(--surface); border-radius:6px; padding:3px 9px; cursor:pointer; font-weight:600; color:var(--ink); }
.widget-editbar .we-cs:hover{ background:var(--accent-soft); }
.widget-editbar .we-cols{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.widget-editbar .we-colck{ display:inline-flex; align-items:center; gap:4px; cursor:pointer; }
.widget.wcs-sm .widget-body{ font-size:11px; }
.widget.wcs-md .widget-body{ font-size:13px; }
.widget.wcs-lg .widget-body{ font-size:15px; }

/* Formulaire animal : sections dépliables */
.form-section{ border:1px solid var(--border); border-radius:10px; margin-bottom:14px; background:var(--surface); overflow:hidden; }
.form-section > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:9px; padding:12px 15px; font-weight:600; color:var(--ink); background:var(--surface-2); }
.form-section > summary::-webkit-details-marker{ display:none; }
.form-section .fs-caret{ display:inline-block; width:12px; text-align:center; font-size:11px; transition:transform var(--t); color:var(--accent); }
.form-section[open] > summary .fs-caret{ transform:rotate(90deg); }
.form-section .fs-body{ padding:15px; }
.alim-group{ margin-bottom:12px; }
.alim-title{ margin:0 0 6px; font-size:12px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); font-weight:600; }
.alim-row{ display:flex; gap:6px; margin-bottom:6px; align-items:center; }
.alim-row input{ flex:1; min-width:0; }
.alim-del,.sante-del{ border:0; background:none; color:var(--danger); cursor:pointer; font-size:18px; line-height:1; padding:2px 8px; border-radius:6px; }
.alim-del:hover,.sante-del:hover{ background:#FBECEA; }
.sante-row{ display:flex; gap:6px; margin-bottom:6px; align-items:center; }
.sante-row .sr-int{ flex:0 0 40%; min-width:0; }
.sante-row .sr-det{ flex:1; min-width:0; }

/* 14. RESPONSIVE & IMPRESSION -------------------------------------- */
@media(min-width:860px){
  .sidebar{ position:sticky; height:100vh; top:0; transform:none; }
  .burger{ display:none; }
  .main{ padding-bottom:0; }
  .bottomnav{ display:none; }
}
@media(max-width:859px){
  #dash-widgets{ grid-template-columns:1fr; grid-auto-rows:auto; }
  .widget{ grid-column:1 / -1 !important; grid-row:auto !important; }
  .widget-body{ max-height:420px; }
}
@media(max-width:640px){
  .grid.cols-4{ grid-template-columns:repeat(2,1fr); }
  .grid.cols-3{ grid-template-columns:1fr; }
  .grid.cols-2{ grid-template-columns:1fr; }
  .form-grid{ grid-template-columns:1fr; }
  .dl{ grid-template-columns:1fr; }
  .content{ padding:16px 14px; }
}
@media(max-width:760px){ .cal-layout{ grid-template-columns:1fr; } .cal-mini{ position:static; } }
@media print{
  .sidebar,.topbar,.bottomnav,.no-print{ display:none!important; }
  .main{ padding:0; } .content{ max-width:none; }
  body{ background:var(--blanc); }
  .card,.table-wrap{ box-shadow:none; border:1px solid var(--border); }
}
@media (prefers-reduced-motion: reduce){ *,*::before,*::after{ transition:none !important; } }
