/* styles.css — système visuel Dynam Contact */

:root {
  --yellow: #FFD000;
  --yellow-deep: #F2B800;
  --yellow-soft: #FFE680;
  --ink: #161616;
  --ink-2: #232220;
  --ink-3: #34322e;

  /* police d'affichage (pilotée par Tweaks) */
  --font-display: "Saira Condensed", sans-serif;
  --font-ui: "Archivo", sans-serif;

  /* surfaces — thème CLAIR par défaut */
  --bg: #F4F4F1;
  --bg-2: #ECEBE6;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --border: #E2E1DB;
  --border-strong: #cdccc4;
  --text: #1b1b1a;
  --text-2: #6d6c66;
  --text-3: #9a988f;
  --header-bg: #161616;
  --header-text: #ffffff;

  --green: #1f9d55;
  --green-bg: #e3f5ea;
  --red: #e23b3b;
  --red-bg: #fce4e4;
  --amber: #d98a00;
  --amber-bg: #fdf0d9;
  --blue: #2f6fed;
  --blue-bg: #e6eefe;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20,20,18,.06), 0 1px 3px rgba(20,20,18,.05);
  --shadow: 0 4px 14px rgba(20,20,18,.08), 0 2px 4px rgba(20,20,18,.05);
  --shadow-lg: 0 18px 50px rgba(20,20,18,.18);
}

/* thème SOMBRE */
[data-theme="dark"] {
  --bg: #131312;
  --bg-2: #19181700;
  --surface: #201F1D;
  --surface-2: #262522;
  --border: #322f2b;
  --border-strong: #444039;
  --text: #f3f1ea;
  --text-2: #aaa79e;
  --text-3: #7c7a72;
  --header-bg: #0d0d0c;
  --header-text: #ffffff;
  --green-bg: #15321f;
  --red-bg: #3a1d1d;
  --amber-bg: #3a2c12;
  --blue-bg: #1a2540;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 6px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 22px 60px rgba(0,0,0,.6);
}

/* thème PUNCH — jaune dominant */
[data-theme="punch"] {
  --bg: #FFD000;
  --bg-2: #f5c400;
  --surface: #1a1a18;
  --surface-2: #232220;
  --border: #2f2e2a;
  --border-strong: #444039;
  --text: #f5f3ec;
  --text-2: #b7b4ab;
  --text-3: #8a877e;
  --header-bg: #161616;
  --header-text: #FFD000;
  --green-bg: #15321f;
  --red-bg: #3a1d1d;
  --amber-bg: #3a2c12;
  --blue-bg: #1a2540;
  --shadow-sm: 0 2px 4px rgba(120,95,0,.18);
  --shadow: 0 8px 22px rgba(120,95,0,.22);
  --shadow-lg: 0 22px 60px rgba(90,70,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100vh; }

/* tabular numbers everywhere by default for data */
.tnum { font-variant-numeric: tabular-nums; }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: uppercase;
}
.kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.overline {
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* scrollbars discrets */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

/* parallélogramme incliné — écho du logo */
.skew-tag {
  display: inline-flex;
  align-items: center;
  transform: skewX(-9deg);
}
.skew-tag > * { transform: skewX(9deg); }

/* animation helpers (désactivables) */
[data-anim="off"] * { animation: none !important; transition: none !important; }

@keyframes dc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dc-pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dc-slidein { from { transform: translateX(100%); } to { transform: none; } }

.anim-rise { animation: dc-rise .5s cubic-bezier(.2,.7,.2,1) both; }
.anim-fade { animation: dc-fade .4s ease both; }

.focus-ring:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* line clamp */
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   Admin — responsive mobile
   ============================================================ */
/* form — grilles 2-col → 1-col sous 520 px */
@media (max-width: 520px) {
  .form-grid2 { grid-template-columns: 1fr !important; }
}

@media (max-width: 680px) {
  /* page header: stack title + actions */
  .adm-hd { flex-direction: column !important; align-items: flex-start !important; }
  .adm-actions { width: 100%; }
  .adm-actions > button { flex: 1 !important; justify-content: center !important; }

  /* stats: 2 colonnes compactes */
  .adm-stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* barre filtres: empilée */
  .adm-filters { flex-direction: column !important; align-items: stretch !important; }
  .adm-chips { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .adm-filters-right { width: 100%; }
  .adm-filters-right > div:first-child { width: auto !important; flex: 1 !important; }

  /* grilles 2-col dans modals → 1-col */
  .adm-grid2 { grid-template-columns: 1fr !important; }

  /* pied de modal : empilé */
  .adm-modal-foot { flex-direction: column !important; align-items: stretch !important; }
  .adm-modal-foot-btns { flex-direction: column !important; width: 100%; }
  .adm-modal-foot-btns > button { width: 100% !important; justify-content: center !important; }

  /* fiche paiement : wrap sur petits écrans */
  .adm-pay-row { flex-wrap: wrap !important; }
  .adm-pay-amount { font-size: 22px !important; }
}
