
:root {
  --teal: #0a9396;
  --teal-dark: #005f73;
  --teal-light: #94d2bd;
  --gold: #e9c46a;
  --gold-dark: #f4a261;
  --green: #2d6a4f;
  --green-light: #52b788;
  --navy: #023047;
  --white: #ffffff;
  --off-white: #f8f9f5;
  --text: #1a1a2e;
  --text-muted: #5a6472;
  --card-bg: #ffffff;
  --border: #e2e8df;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--off-white);
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0,31,47,0.95);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
  border-bottom: 1px solid rgba(148,210,189,0.2);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--teal-light); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--teal-light); }

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; color: white !important; }

/* HERO */
.hero {
  min-height: 100vh;
  background-color: #011f2e !important;
  background-image: linear-gradient(135deg, #011f2e 0%, #012a3a 50%, #07382b 100%) !important;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 6rem 8vw 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(10,147,150,0.25) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(148,210,189,0.25);
  border: 1px solid rgba(148,210,189,0.6);
  color: #94d2bd !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  position: relative;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green-light);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  color: #ffffff !important;
  line-height: 1.05;
  margin-bottom: 1rem;
  position: relative;
  text-shadow: 0 2px 30px rgba(0,0,0,0.8);
}

.hero h1 em {
  font-style: normal;
  color: #94d2bd !important;
}

.hero-tagline {
  font-size: 1.2rem;
  color: #ffffff !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
  position: relative;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero-tagline-2 {
  font-size: 1rem;
  color: rgba(255,255,255,0.85) !important;
  font-weight: 400;
  margin-bottom: 3rem;
  position: relative;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  position: relative;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: all 0.25s;
  border: 2px solid var(--teal);
}
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-2px); }

.btn-secondary {
  background: rgba(0,0,0,0.3);
  color: #ffffff !important;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.25s;
}
.btn-secondary:hover { border-color: var(--teal-light); color: var(--teal-light); }

.hero-stats {
  position: absolute; bottom: 3rem; right: 8vw;
  display: flex; gap: 3rem;
}
.stat { text-align: center; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: #94d2bd !important;
  display: block;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.hero-scroll {
  position: absolute; bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  animation: scrollLine 1.5s ease-in-out infinite;
}
@keyframes scrollLine { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

/* SECTIONS */
section { padding: 6rem 8vw; }
section:nth-child(even) { background: var(--white); }

.section-label {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #005f73;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* QUI SOMMES NOUS */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.about-pillars {
  display: grid;
  gap: 1.25rem;
}

.pillar {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

.pillar-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.pillar-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* COMMUNES */
.communes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.commune-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.commune-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--green-light));
  opacity: 0;
  transition: opacity 0.3s;
}

.commune-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(10,147,150,0.15); }
.commune-card:hover::before { opacity: 1; }

.commune-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.commune-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.commune-cp {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.commune-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  font-family: 'Playfair Display', serif;
}

.commune-count-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ANNUAIRE */
#annuaire { background: var(--off-white); }

.annuaire-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 3rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
  outline: none;
}
.search-box input:focus { border-color: var(--teal); }

.search-box::before {
  content: '🔍';
  position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}

.filter-select {
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6472' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.filter-select:focus { border-color: var(--teal); }

.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-weight: 500;
  white-space: nowrap;
}

.result-count strong { color: var(--teal); }

/* profession filter chips */
.prof-chips {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.chip:hover, .chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* PRO CARDS GRID */
.pros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.pro-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: all 0.25s;
  position: relative;
}

.pro-card:hover {
  border-color: var(--teal-light);
  box-shadow: 0 6px 24px rgba(10,147,150,0.1);
  transform: translateY(-2px);
}

.pro-card-header {
  display: flex; align-items: flex-start; gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.pro-avatar {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pro-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

.pro-specialty {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.pro-profession-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.pro-info {
  display: flex; flex-direction: column; gap: 0.3rem;
}

.pro-info-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pro-info-item .icon { font-size: 0.9rem; flex-shrink: 0; }

.mode-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 0.5rem;
}

.mode-liberal { background: #14532d; color: #dcfce7; }
.mode-salarie { background: #1e3a8a; color: #dbeafe; }

/* Profession colors — dark text on light bg, always high contrast */
.prof-Médecin { background: #78350f; color: #fef3c7; }
.prof-Infirmier { background: #1e3a8a; color: #dbeafe; }
.prof-Pharmacien { background: #581c87; color: #f3e8ff; }
.prof-Kinésithérapeute { background: #14532d; color: #dcfce7; }
.prof-Chirurgien { background: #7f1d1d; color: #fee2e2; }
.prof-Psychologue { background: #701a75; color: #fce7f3; }
.prof-Sage-Femme { background: #7c2d12; color: #ffedd5; }
.prof-other { background: #1e293b; color: #e2e8f0; }

/* avatar colors — light bg for emoji contrast */
.avatar-medecin { background: #fef3c7; }
.avatar-infirmier { background: #dbeafe; }
.avatar-pharmacien { background: #f3e8ff; }
.avatar-kine { background: #dcfce7; }
.avatar-chirurgien { background: #fee2e2; }
.avatar-psy { background: #fce7f3; }
.avatar-sage { background: #ffedd5; }
.avatar-other { background: #f1f5f9; }

/* URGENCES */
.urgences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.urgence-card {
  background: linear-gradient(135deg, var(--navy), #012a3a);
  border-radius: 12px;
  padding: 1rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: transform 0.2s;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}
.urgence-card:hover { transform: translateY(-3px); }

.urgence-icon { font-size: 1.3rem; flex-shrink: 0; }
.urgence-name { font-size: .82rem; color: rgba(255,255,255,0.9); font-weight: 600; word-break: break-word; }
.urgence-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
  padding-top: .3rem;
}

/* MEMBRES */
.membres-section {
  background: linear-gradient(135deg, var(--navy) 0%, #012a3a 60%, #0a3a2a 100%);
  color: var(--white);
  text-align: center;
}

.membres-section .section-title { color: var(--white); }
.membres-section .section-sub { color: rgba(255,255,255,0.65); max-width: 560px; margin: 0 auto 2.5rem; }

.membres-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}

.feature-item {
  padding: 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}

.feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-title { font-weight: 700; margin-bottom: 0.4rem; font-size: 0.95rem; }
.feature-desc { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form {
  display: flex; flex-direction: column; gap: 1rem;
}

.form-group {
  display: flex; flex-direction: column; gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--teal); }

.form-group textarea { resize: vertical; min-height: 120px; }

.btn-form {
  background: var(--teal);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.btn-form:hover { background: var(--teal-dark); }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.contact-block h4 {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.contact-block p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.contact-block a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

/* FOOTER */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 2rem 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  overflow: hidden;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
}
.footer-logo span { color: var(--teal-light); }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal-light); }

.footer-copy { font-size: 0.8rem; }

/* FADE IN */
.fade-in {}


/* no results */
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
  grid-column: 1/-1;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-grid, .contact-grid, .membres-features { grid-template-columns: 1fr; gap: 2rem; }
  .communes-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { position: static; margin-top: 3rem; justify-content: flex-start; }
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  section { padding: 4rem 5vw; }
}

@media (max-width: 600px) {
  .communes-grid { grid-template-columns: 1fr 1fr; }
  .pros-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; text-align: center; }
  .hero { padding: 5rem 5vw 3rem; }
}

/* ETABLISSEMENTS MEDICO-SOCIAUX */
.ems-tabs {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.ems-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--off-white);
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: "DM Sans", sans-serif;
}
.ems-tab:hover, .ems-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}
.ems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.ems-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  border-left: 4px solid var(--teal);
  transition: all 0.25s;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.ems-card:hover {
  box-shadow: 0 6px 24px rgba(10,147,150,0.1);
  transform: translateY(-2px);
}
.ems-card.hidden { display: none; }
.ems-header {
  display: flex; align-items: flex-start; gap: 0.85rem;
}
.ems-icon {
  font-size: 1.75rem; flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--off-white);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.ems-name {
  font-weight: 700; color: var(--navy);
  font-size: 0.95rem; line-height: 1.25;
}
.ems-type {
  font-size: 0.78rem; color: var(--teal-dark);
  font-weight: 600; margin-top: 0.2rem;
}
.ems-detail {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.65; flex: 1;
}
.ems-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.ems-commune {
  font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
}
.ems-tel {
  font-size: 0.82rem; font-weight: 700;
  color: var(--teal-dark);
  text-decoration: none;
  background: #e0f5f5;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  transition: background 0.2s;
}
.ems-tel:hover { background: var(--teal-light); }
.ems-add-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-size: 0.88rem;
  color: #92400e;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.ems-add-notice a {
  color: var(--teal-dark); font-weight: 700; text-decoration: none;
}

@media (max-width: 900px) {
  #sps > div { grid-template-columns: 1fr !important; }
}


/* VIEW TABS */
.view-tabs {
  display: flex; gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}
.view-tab {
  padding: 0.55rem 1.4rem;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: "DM Sans", sans-serif;
}
.view-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}


/* PAYWALL */


.paywall-box {
  background: #ffffff;
  border: 2px solid #0a9396;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(10,147,150,0.15);
  pointer-events: all;
}
.paywall-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.paywall-title {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #011f2e;
  margin-bottom: 0.5rem;
}
.paywall-sub {
  font-size: 0.88rem;
  color: #5a6472;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.paywall-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0a9396;
  color: #ffffff;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
  margin-bottom: 0.75rem;
}
.paywall-btn:hover { background: #005f73; }
.paywall-already {
  font-size: 0.8rem;
  color: #5a6472;
  margin-top: 0.5rem;
}
.paywall-already a {
  color: #0a9396;
  font-weight: 600;
  text-decoration: none;
}


/* Adhesion banner in nav */

  .adhesion-banner a { align-self: center; }
}


/* ACCESS CODE */
.access-modal {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(1,31,46,0.85);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.access-modal.open { display: flex; }
.access-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px; width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.access-box h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem; color: #011f2e;
  margin-bottom: 0.5rem;
}
.access-box p { color: #5a6472; font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.6; }
.access-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8df;
  border-radius: 8px;
  font-size: 1.1rem;
  font-family: "DM Sans", sans-serif;
  text-align: center;
  letter-spacing: 0.15em;
  font-weight: 700;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
  text-transform: uppercase;
}
.access-input:focus { border-color: #0a9396; }
.access-input.error { border-color: #e63946; animation: shake 0.3s; }
@keyframes shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)}
}
.access-btn {
  width: 100%;
  background: #0a9396; color: #fff;
  border: none; border-radius: 8px;
  padding: 0.9rem; font-size: 1rem;
  font-weight: 700; font-family: "DM Sans", sans-serif;
  cursor: pointer; transition: background 0.2s;
  margin-bottom: 0.75rem;
}
.access-btn:hover { background: #005f73; }
.access-error {
  color: #e63946; font-size: 0.82rem;
  margin-bottom: 0.5rem; display: none;
}
.access-close {
  font-size: 0.8rem; color: #5a6472;
  cursor: pointer; text-decoration: underline;
  background: none; border: none;
  font-family: "DM Sans", sans-serif;
}
/* unlocked state */


#map.unlocked { filter: none !important; pointer-events: all !important; }


/* SKIP LINK accessibilité */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: #011f2e;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus visible renforcé */
:focus-visible {
  outline: 3px solid #0a9396;
  outline-offset: 3px;
  border-radius: 3px;
}


/* COOKIE BANNER */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #011f2e;
  color: #ffffff;
  padding: 1.25rem 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 3px solid #0a9396;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.cookie-banner p a { color: #94d2bd; text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-accept {
  background: #0a9396; color: #fff;
  border: none; padding: 0.6rem 1.25rem;
  border-radius: 6px; font-weight: 700;
  cursor: pointer; font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
}
.cookie-refuse {
  background: transparent; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.6rem 1.25rem;
  border-radius: 6px; font-weight: 600;
  cursor: pointer; font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
}
.cookie-refuse:hover { color: #fff; border-color: #fff; }


.accordion{display:flex;flex-direction:column;gap:.4rem;margin-top:1rem;}
.acc-item{border:1px solid #e2e8df;border-radius:8px;overflow:hidden;}
.acc-btn{width:100%;display:flex;justify-content:space-between;align-items:center;padding:.9rem 1.1rem;background:#fff;border:none;cursor:pointer;font-family:'DM Sans',sans-serif;font-size:.9rem;font-weight:600;color:#011f2e;text-align:left;gap:.5rem;}
.acc-btn:hover{background:#f8f9f5;}
.acc-arrow{flex-shrink:0;transition:transform .2s;}
.acc-btn[aria-expanded="true"] .acc-arrow{transform:rotate(180deg);}
.acc-body{padding:.75rem 1.1rem;}
.acc-body p{color:#5a6472;font-size:.85rem;line-height:1.7;margin-bottom:.5rem;}


/* FIX SCROLL HORIZONTAL */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
.leaflet-container, .leaflet-container * {
  max-width: none !important;
}
.leaflet-tile {
  max-width: none !important;
}
img, video {
  max-width: 100%;
}


/* TOGGLE PROS / EMS */
.annuaire-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border: 2px solid var(--teal);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}
.toggle-btn {
  flex: 1;
  padding: .9rem 1rem;
  border: none;
  background: transparent;
  color: var(--teal);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.toggle-btn.active {
  background: var(--teal);
  color: #fff;
}


/* URGENCES : accordéon sur mobile, grille directe sur desktop */
.urgences-acc-wrapper { display: block; }
.urgences-grid-direct { display: none; }

@media (min-width: 768px) {
  .urgences-acc-wrapper { display: none; }
  .urgences-grid-direct { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
}

/* NAV BANDEAU */
.nav-links-desktop {
  display: none;
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .nav-links-desktop { display: flex; }
  nav[role="navigation"] { height: 70px !important; }
}
.nav-links-desktop .nav-link {
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
}
.nav-links-desktop .nav-cta {
  background: rgba(10,147,150,0.85);
  padding: .3rem .75rem;
  border-radius: 6px;
}
