/* ============================================================
   shared.css — Variables & reset communs à tout le projet
   Cabanons Riopel / Cabanons Idéal CRM
   ============================================================ */

/* ── Google Fonts (déjà dans le HTML, mais réservé ici) ─── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Variables CSS ───────────────────────────────────────── */
:root {
  /* Couleurs marque */
  --red:        #C8102E;
  --red-dk:     #9B0D22;
  --red-md:     #b00d27;
  --red-lt:     #fdf1f3;
  --red-xlt:    #fef7f8;

  /* Neutres */
  --white:      #FFFFFF;
  --off-white:  #F7F4F2;
  --off:        #F4F1EF;
  --gray-lt:    #F0ECEB;
  --border:     #E2D9D5;
  --gray:       #6B6B6B;
  --gray-dk:    #3D3533;
  --text:       #1a1a1a;

  /* Statuts */
  --s-pas-traite:      #6B6B6B;
  --s-envoye:          #1a6e3c;
  --s-manque:          #a05d00;
  --s-n-achetera:      #8B0000;
  --s-refuse:          #5a3b8c;
  --s-achete:          #145a32;
  --s-attente:         #1a5276;

  --s-pas-traite-bg:   #F0EFEE;
  --s-envoye-bg:       #e8f7ee;
  --s-manque-bg:       #fff3e0;
  --s-n-achetera-bg:   #fde8e8;
  --s-refuse-bg:       #f0ebff;
  --s-achete-bg:       #d5f5e3;
  --s-attente-bg:      #d6eaf8;

  /* Typographie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Espacements */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  /* Ombres */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 4px 24px rgba(200,16,46,.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.12);
  --shadow-red: 0 4px 20px rgba(200,16,46,.25);
}

/* ── Reset minimal ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--off);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button, input, select, textarea {
  font-family: var(--font-body);
}

/* ── Utilitaires génériques ──────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.text-red   { color: var(--red); }
.text-gray  { color: var(--gray); }
.font-bold  { font-weight: 600; }

/* ── Boutons de base ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dk) 100%);
  color: var(--white);
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,16,46,.40);
}

.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--off); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

/* ── Alertes flash ───────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #e8f7ee; color: #1d6b2e; border: 1px solid #b3dfba; }
.alert-error   { background: var(--red-lt); color: var(--red-dk); border: 1px solid #f1b0bb; }
.alert-warning { background: #fff3e0; color: #7d4e00; border: 1px solid #f5c880; }
.alert-info    { background: #d6eaf8; color: #1a5276; border: 1px solid #a9cce3; }
.alert ul      { margin: 6px 0 0 18px; }

/* ── Spinner de chargement ───────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(200,16,46,.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* ── Badges de statut ────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── Responsive helpers ──────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
