/* Pharmacie de Sainte-Croix-aux-Mines — Modern UI */

:root {
  --paper: #ffffff;
  --paper-deep: #f7f8fa;
  --paper-dark: #eef0f4;
  --ink: #0a0c12;
  --ink-soft: #3d4350;
  --ink-mute: #6b7280;
  --rule: #e5e7eb;
  --rule-soft: #eef0f3;

  --accent: #10b981;
  --accent-deep: #047857;
  --accent-pale: #ecfdf5;
  --brass: #6366f1;
  --brass-pale: #eef2ff;

  --serif: 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(10,12,18,0.04), 0 1px 3px rgba(10,12,18,0.06);
  --shadow: 0 4px 12px rgba(10,12,18,0.06), 0 2px 4px rgba(10,12,18,0.04);
  --shadow-lg: 0 16px 40px rgba(10,12,18,0.10), 0 4px 12px rgba(10,12,18,0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Frames ---------- */
.frame {
  background: var(--paper);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.frame-desktop { width: 1440px; height: 900px; overflow-y: auto; }
.frame-mobile { width: 390px; height: 844px; overflow-y: auto; }

.frame::-webkit-scrollbar { width: 6px; height: 6px; }
.frame::-webkit-scrollbar-track { background: transparent; }
.frame::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

/* ---------- Type system ---------- */
.h-display {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.0;
  color: var(--ink);
}
.h-title {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.h-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-pale);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.h-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.body-lg {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  text-wrap: pretty;
}
.body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.caption {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #1d2030; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16,185,129,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.25); }
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: var(--paper-deep); border-color: var(--ink-mute); }
.btn-link {
  background: transparent;
  color: var(--accent-deep);
  padding: 0;
  font-weight: 500;
}
.btn-link:hover { color: var(--ink); }

.btn-arrow svg { transition: transform 0.2s; }
.btn-arrow:hover svg { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--rule));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-flat {
  background: var(--paper-deep);
  border-radius: var(--radius-lg);
}

/* ---------- Barre de navigation, écrans intermédiaires ----------
   Entre 768px (bascule mobile) et 1150px, cinq onglets + le nom de la pharmacie
   + le bouton d'ordonnance deviennent trop larges : on resserre plutôt que de
   laisser le nom se casser sur trois lignes. Le !important est nécessaire, les
   styles de la barre étant posés en ligne par le composant. */
@media (min-width: 768px) and (max-width: 1150px) {
  .nav-main {
    padding-left: 20px !important;
    padding-right: 20px !important;
    gap: 12px !important;
  }
  .nav-links > span {
    padding-left: 8px !important;
    padding-right: 8px !important;
    font-size: 13.5px !important;
  }
  .nav-logo span { font-size: 13px !important; }
}
/* Sous 1000px, il ne reste plus la place du nom complet à côté des onglets :
   le sigle suffit à identifier le site, et le nom reste dans le titre de page. */
@media (min-width: 768px) and (max-width: 1000px) {
  .nav-logo span { display: none; }
}

/* ---------- Carte « pharmacie de garde » ----------
   Volontairement distincte des autres cartes : c'est le seul bloc cliquable
   de la zone, et l'information la plus urgente du site. */
.guard-card {
  position: relative;
  display: block;
  width: 100%;
  font: inherit;
  text-align: left;
  background: var(--accent-pale);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}
.guard-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.18);
  transform: translateY(-2px);
}
.guard-card:active { transform: translateY(0); }
.guard-card:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}
.guard-card .guard-cta svg { transition: transform 0.2s; }
.guard-card:hover .guard-cta svg { transform: translateX(3px); }

/* ---------- Hero image crossfade ---------- */
.hero-image-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  background: var(--paper-deep);
  isolation: isolate;
}

.hero-image-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(10,12,18,0.04) 100%);
  pointer-events: none;
}

.hero-image-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.018);
  filter: saturate(1.02) contrast(1.01);
  transition:
    opacity 1.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 4.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.hero-image-layer.is-active {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Image placeholders (clean, modern) ---------- */
.ph {
  position: relative;
  background: linear-gradient(135deg, var(--paper-deep) 0%, var(--paper-dark) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(16,185,129,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(99,102,241,0.06) 0%, transparent 50%);
}
.ph-label {
  position: relative;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  background: var(--paper);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ph-label::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

/* ---------- Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.tag-accent {
  color: var(--accent-deep);
  background: var(--accent-pale);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}

/* ---------- Service card ---------- */
.svc-card {
  padding: 28px 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.svc-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rule));
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.svc-card .svc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* ---------- Nav ---------- */
.nav-link {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-deep); }
.nav-link.active {
  color: var(--ink);
  background: var(--paper-deep);
}

/* ---------- Inputs ---------- */
.field {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  outline: none;
  transition: all 0.15s;
}
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  display: block;
}

/* ---------- Mobile menu ---------- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  color: var(--ink);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Animations ---------- */
.fade-in { animation: pageIn 0.35s ease; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-pale);
  color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent); }
}

/* ---------- Hero gradient halo ---------- */
.hero-halo {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  /* background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 65%); */
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Stat block ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-feature-settings: 'tnum';
}
