@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
:root {
  --coral: #e2232a; --coral-2: #ff5a5f; --coral-soft: #fdecec; --blue: #1d4ed8; --blue-soft: #e8efff; --ink: #1f2430; --muted: #6b7280;
  --line: #e7e9ee; --bg: #f4f5f8; --card: #fff; --ok: #16a34a; --warn: #f59e0b; --info: #3b82f6; --violet: #8b5cf6;
  --indigo: #1d4ed8; --radius: 14px; --shadow: 0 6px 24px rgba(20, 24, 40, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: #fff; font-size: 14px; line-height: 1.5; }
a { color: var(--coral); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; }
/* Ordinateur : le contenu occupe 94 % de la largeur de l’écran (1840 px au plus, très grands écrans). Mobile : pleine largeur avec une marge de 16 px. */
.container { width: 94%; max-width: 1840px; margin: 0 auto; padding-left: 0 !important; padding-right: 0 !important; }
@media (max-width: 860px) {
  .container { width: 100%; padding-left: 16px !important; padding-right: 16px !important; }
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* boutons & champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 18px; font: inherit; font-weight: 500; cursor: pointer; background: linear-gradient(90deg, var(--coral), #f0444a); color: #fff; transition: .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(226, 35, 42, .3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.outline { background: #fff; color: var(--coral); border-color: var(--coral); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.dark { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn.indigo { background: linear-gradient(90deg, var(--coral), #f0444a); }
.btn.blue { background: var(--indigo); }
.badge.blue { background: #e8efff; color: var(--indigo); }
.btn.green { background: var(--ok); }
.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn.google { background: #fff; color: #333; border-color: #dadce0; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 14px; border: 1px solid #cfd3da; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
input[type=checkbox] { width: auto; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 10px 0 4px; }
.field-lg input, .field-lg select { padding: 14px 22px; border: 1.5px solid var(--ink); border-radius: 8px; }

/* cartes */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--coral-soft); color: var(--coral); }
.badge.ok { background: #dcfce7; color: var(--ok); } .badge.warn { background: #fef3c7; color: #b45309; }
.badge.info { background: #dbeafe; color: #1d4ed8; } .badge.violet { background: #ede9fe; color: #6d28d9; } .badge.grey { background: #f1f5f9; color: #475569; }
.kpi { font-size: 28px; font-weight: 700; color: var(--coral); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* en-tête public */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.topbar .container { display: flex; align-items: center; gap: 20px; height: 78px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 18px; }
.logo svg { width: 44px; height: 44px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--coral); }
.burger { display: none; margin-left: auto; background: none; border: 0; font-size: 26px; }
@media (max-width: 860px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 78px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav { align-items: stretch; gap: 4px; max-height: calc(100vh - 64px); overflow-y: auto; top: 64px; }
  .nav a { padding: 12px 8px; }
  .nav .btn { margin-top: 6px; }
  .topbar .container { height: 64px; gap: 12px; }
  .logo { font-size: 16px; }
  .logo svg { width: 36px; height: 36px; }
  .burger { cursor: pointer; padding: 6px 8px; line-height: 1; }
  /* 16 px minimum : évite le zoom automatique d'iOS à la saisie */
  input, select, textarea { font-size: 16px; }
  .modal-bg { padding: 12px 8px; }
  .modal { padding: 20px 16px; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .card { padding: 16px; overflow-x: auto; }
  footer.site { padding: 30px 0 16px; margin-top: 40px; }
}

/* modale */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 18, 30, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; padding: 26px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { max-width: 860px; }
.modal .close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--coral); border-color: var(--coral); }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); max-width: 360px; animation: up .25s; }
.toast.err { background: #b91c1c; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* créneaux */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { min-width: 74px; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; font: inherit; }
.day.active { border-color: var(--coral); background: var(--coral-soft); color: var(--coral); font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 12px; }
.slot { padding: 8px 0; border-radius: 8px; border: 1px solid var(--coral); color: var(--coral); background: #fff; cursor: pointer; font: inherit; font-weight: 500; }
.slot:hover, .slot.sel { background: var(--coral); color: #fff; }
.slot:disabled { border-color: var(--line); color: #c0c4cc; background: #f8f9fb; cursor: not-allowed; text-decoration: line-through; }

footer.site { background: #1f2430; color: #c9ccd3; padding: 40px 0 20px; margin-top: 60px; }
footer.site a { color: #fff; }
footer.site h4 { color: #fff; margin: 0 0 10px; }
