/* ========================================
   Dr Jean-Michel Roussille — Site web
   ======================================== */

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

:root {
  --bleu: #1a5276;
  --bleu-clair: #2980b9;
  --bleu-tres-clair: #eaf2f8;
  --blanc: #ffffff;
  --gris-clair: #f4f6f7;
  --gris: #5d6d7e;
  --texte: #2c3e50;
  --rouge: #c0392b;
  --rouge-fond: #fdedec;
  --vert: #1e8449;
  --vert-fond: #eafaf1;
  --rayon: 8px;
  --ombre: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texte);
  line-height: 1.6;
  background: var(--blanc);
}

a {
  color: var(--bleu-clair);
  text-decoration: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--bleu);
  color: var(--blanc);
  padding: 0.5rem 1rem;
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  background: var(--bleu);
  color: var(--blanc);
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header .subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

.header .rpps {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Language selector */
.lang-selector {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.lang-btn {
  background: transparent;
  color: var(--blanc);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-btn:hover,
.lang-btn:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--blanc);
}

.lang-btn.active {
  background: var(--blanc);
  color: var(--bleu);
  border-color: var(--blanc);
}

/* Bandeau urgence */
.urgence {
  background: var(--rouge-fond);
  border-left: 4px solid var(--rouge);
  padding: 1rem 0;
  text-align: center;
}

.urgence strong {
  color: var(--rouge);
}

.urgence a {
  color: var(--rouge);
  font-weight: 700;
  text-decoration: underline;
}

/* Navigation */
.nav {
  background: var(--blanc);
  border-bottom: 1px solid #dce1e6;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--bleu);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--bleu-clair);
  text-decoration: none;
  border-bottom: 2px solid var(--bleu-clair);
  outline: none;
}

.nav a:focus-visible {
  outline: 2px solid var(--bleu-clair);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--gris-clair);
}

.section h2 {
  font-size: 1.5rem;
  color: var(--bleu);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Cartes */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--bleu);
  margin-bottom: 0.75rem;
}

.card-address {
  font-size: 0.9rem;
  color: var(--gris);
  margin-bottom: 1rem;
}

.card a {
  color: var(--bleu-clair);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Carte */
.card-map {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.card-map iframe {
  display: block;
  border-radius: var(--rayon);
}

/* Tableau horaires */
.horaires-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.horaires-table th,
.horaires-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eaecee;
}

.horaires-table th:not(:first-child),
.horaires-table td:not(:first-child) {
  text-align: center;
}

.horaires-table thead th {
  font-weight: 600;
  color: var(--gris);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.horaires-table tbody th {
  font-weight: 400;
  text-align: left;
}

/* Accessibilité */
.card-accessible {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.accessible-badge {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--vert);
  background: var(--vert-fond);
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  margin-bottom: 0.75rem;
}

/* Footer */
.footer {
  background: var(--bleu);
  color: var(--blanc);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

.footer a {
  color: var(--blanc);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .header .subtitle {
    font-size: 1rem;
  }

  .nav ul {
    gap: 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}
