/* ===== Design system — Cabinet infirmier Claudia (orange & gris) ===== */
:root {
  --orange-700: #c2410c;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --orange-50:  #fff7ed;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  --ink:      var(--gray-900);
  --ink-soft: var(--gray-600);
  --line:     var(--gray-200);
  --bg:       var(--gray-50);
  --white:    #ffffff;
  --danger:   #b91c1c;

  --radius:   14px;
  --shadow:   0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-sm:0 1px 3px rgba(17, 24, 39, 0.08), 0 1px 2px rgba(17,24,39,0.04);
  --maxw:     1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); letter-spacing: -0.01em; }
a { color: var(--orange-700); }
img { max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 64px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: var(--orange-600); }

/* ===== Navigation ===== */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; color: var(--gray-900); text-decoration: none; font-size: 1.08rem; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; background: linear-gradient(135deg, var(--orange-500), var(--orange-700)); display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(234,88,12,.35); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--gray-600); font-weight: 600; padding: 8px 13px; border-radius: 9px; font-size: 0.95rem; transition: .15s; }
.nav-links a:hover { background: var(--orange-50); color: var(--orange-700); }
.nav-links a.active { color: var(--orange-700); background: var(--orange-50); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--gray-800); cursor: pointer; }

/* ===== Boutons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--orange-600); color: #fff; text-decoration: none; border: 0; border-radius: 11px; padding: 12px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: .15s; box-shadow: 0 6px 16px rgba(234,88,12,.25); }
.btn:hover { background: var(--orange-700); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(234,88,12,.33); }
.btn.ghost { background: transparent; color: var(--gray-800); border: 1.5px solid var(--gray-300); box-shadow: none; }
.btn.ghost:hover { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-900); }
.btn.small { padding: 7px 13px; font-size: .9rem; box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #991b1b; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== Hero ===== */
.hero { background: radial-gradient(1200px 400px at 80% -10%, var(--orange-100), transparent), linear-gradient(180deg, var(--white), var(--gray-50)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; padding: 72px 22px; max-width: var(--maxw); margin: 0 auto; }
.hero h1 { font-size: 2.7rem; margin: 10px 0 16px; }
.hero p { font-size: 1.16rem; color: var(--ink-soft); margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.hero-card h3 { margin: 0 0 14px; }
.hero-card ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.hero-card li { margin: 8px 0; }
.hero-card li::marker { color: var(--orange-500); }

/* ===== Cartes ===== */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--orange-100); }
.card .ico { font-size: 1.9rem; width: 54px; height: 54px; border-radius: 13px; background: var(--orange-50); display: grid; place-items: center; }
.card h3 { margin: 14px 0 6px; }
.card p { margin: 0; color: var(--ink-soft); }

/* ===== Carte géographique ===== */
#map { height: 440px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.zone-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.zone-badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; color: var(--gray-800); display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); }
.zone-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange-500); }

/* ===== Formulaires ===== */
.field { margin-bottom: 17px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1.5px solid var(--gray-300); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; transition: .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.field textarea { resize: vertical; min-height: 84px; }
.field .hint { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }

/* ===== Agenda / prise de RDV ===== */
.booking { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.day-nav .day-label { font-weight: 800; text-transform: capitalize; font-size: 1.05rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.slot { padding: 11px 0; text-align: center; border: 1.5px solid var(--gray-300); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; transition: .12s; color: var(--gray-800); }
.slot:hover { border-color: var(--orange-500); background: var(--orange-50); color: var(--orange-700); }
.slot.selected { background: var(--orange-600); color: #fff; border-color: var(--orange-600); box-shadow: 0 4px 12px rgba(234,88,12,.3); }
/* créneaux indisponibles : grisés, non cliquables */
.slot.booked, .slot.blocked, .slot.past { background: var(--gray-100); color: var(--gray-400); border-color: var(--gray-200); cursor: not-allowed; text-decoration: line-through; }
.slot.booked:hover, .slot.blocked:hover, .slot.past:hover { background: var(--gray-100); color: var(--gray-400); border-color: var(--gray-200); }
.empty-slots { color: var(--ink-soft); padding: 26px 0; text-align: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; font-size: .86rem; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1.5px solid var(--gray-300); }
.legend i.free { background: #fff; }
.legend i.taken { background: var(--gray-100); border-color: var(--gray-200); }
.legend i.sel { background: var(--orange-600); border-color: var(--orange-600); }

/* ===== Messages ===== */
.alert { border-radius: 10px; padding: 12px 15px; margin: 14px 0; font-weight: 500; }
.alert.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert.info { background: var(--orange-50); color: var(--orange-700); border: 1px solid var(--orange-100); }

/* ===== Forum ===== */
.thread-item { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: .15s; }
.thread-item:hover { border-color: var(--orange-100); transform: translateY(-1px); }
.thread-item a { font-weight: 700; text-decoration: none; color: var(--gray-900); }
.thread-item a:hover { color: var(--orange-700); }
.thread-meta { color: var(--ink-soft); font-size: .88rem; }
.pill { background: var(--orange-50); color: var(--orange-700); border-radius: 999px; padding: 4px 11px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.post { border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: #fff; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.post .post-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.post .author { font-weight: 800; }
.post .body { white-space: pre-wrap; }

/* ===== Admin ===== */
.appt-row { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.appt-row .when { font-weight: 800; color: var(--orange-700); }
.badge { font-size: .76rem; padding: 2px 9px; border-radius: 999px; font-weight: 800; }
.badge.domicile { background: var(--orange-100); color: var(--orange-700); }
.badge.cabinet { background: var(--gray-100); color: var(--gray-700); }
/* grille agenda admin */
.agenda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.aslot { padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--gray-300); background: #fff; cursor: pointer; text-align: center; font-weight: 700; transition: .12s; }
.aslot .t { font-size: 1rem; }
.aslot .s { display: block; font-size: .72rem; font-weight: 600; margin-top: 2px; }
.aslot.free { color: var(--gray-800); }
.aslot.free:hover { border-color: var(--orange-500); background: var(--orange-50); }
.aslot.free .s { color: var(--gray-400); }
.aslot.blocked { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); }
.aslot.blocked:hover { border-color: var(--gray-400); }
.aslot.booked { background: var(--orange-600); color: #fff; border-color: var(--orange-600); }
.aslot.booked .s { color: var(--orange-100); }
.aslot.past { background: var(--gray-50); color: var(--gray-300); border-color: var(--gray-100); cursor: default; }

/* ===== Pied de page ===== */
.footer { background: var(--gray-900); color: #cbd5e1; padding: 48px 0 26px; margin-top: 48px; }
.footer a { color: var(--orange-500); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer h4 { color: #fff; margin: 0 0 12px; }
.footer p, .footer li { color: #9ca3af; margin: 5px 0; font-size: .95rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; font-size: .85rem; color: #6b7280; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .hero-inner, .booking, .grid-3, .grid-2, .footer-grid, .row2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .section { padding: 48px 0; }
  .nav-links { display: none; position: absolute; top: 62px; right: 12px; left: 12px; background: #fff; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}
