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

:root {
  --teal-dark: #00595d;
  --teal: #007d83;
  --teal-soft: #e3f2f2;
  --cream: #ffebbe;
  --orange: #b4450e;
  --ink: #1f2a44;
  --ink-soft: #4a5570;
  --bg: #f3f8f8;
  --radius: 14px;
  --shadow: 0 4px 22px rgba(0, 89, 93, 0.12);
  --ease: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* En-tete et navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--teal-dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
}

#logo {
  height: 52px;
  width: auto;
  max-width: 60vw;
  display: block;
  border-radius: 8px;
  background: #fff;
  padding: 3px 6px;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  transition: background var(--ease), color var(--ease);
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.main-nav a.active {
  background: var(--cream);
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Bandeau d'accueil */
.hero {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  color: #fff;
  padding: 3.5rem 0 4.5rem;
  text-align: center;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.lead {
  max-width: 560px;
  margin: 0 auto;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  opacity: 0.92;
}

/* Contenu */
main {
  margin-top: -2.5rem;
  padding-bottom: 3rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
}

.card h2,
.notice h2 {
  font-size: 1.35rem;
  color: var(--teal-dark);
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
}

.card p:last-child {
  margin-bottom: 0;
}

.service-list {
  list-style: none;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}

.service-list li {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border-left: 4px solid var(--teal);
}

/* Encadre declaration */
.notice {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--orange);
}

.notice-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice p {
  color: var(--ink);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  transition: transform var(--ease), background var(--ease);
}

.btn:hover {
  background: #96370a;
  transform: translateY(-2px);
}

/* Cartes de rubriques */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  border-top: 4px solid var(--teal);
  color: var(--ink);
  transition: transform var(--ease), box-shadow var(--ease);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 89, 93, 0.18);
}

.tile-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.tile-title {
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 1.05rem;
}

.tile-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Pied de page */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.88rem;
}

.site-footer p {
  margin-bottom: 0.3rem;
}

.site-footer a {
  color: var(--cream);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0.6rem 0;
}

.update {
  font-size: 0.78rem;
  opacity: 0.65;
}

/* Smartphones et tablettes */
@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--teal-dark);
    padding: 0.5rem 1.25rem 1.25rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    border-radius: 10px;
    padding: 0.9rem 0.8rem;
    font-size: 1.05rem;
  }

  .hero {
    padding: 2.5rem 0 4rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  .notice {
    flex-direction: column;
    padding: 1.25rem;
  }

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

@media (max-width: 480px) {
  .tiles {
    grid-template-columns: 1fr;
  }

  #logo {
    height: 44px;
  }
}

/* ===== Pages intérieures ===== */
.hero-small {
  padding: 2.25rem 0 4rem;
}

.hero-small h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.hero-small .lead {
  font-size: 1rem;
}

.section-h {
  font-size: 1.3rem;
  color: var(--teal-dark);
  margin: 0.5rem 0 0.4rem;
  padding-left: 0.8rem;
  border-left: 5px solid var(--orange);
}

.section-sub {
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
  padding-left: 1.05rem;
}

.card h3,
.rule h3 {
  color: var(--teal-dark);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.card ul {
  margin: 0.4rem 0 0.9rem 1.2rem;
  color: var(--ink-soft);
}

.card li {
  margin-bottom: 0.35rem;
}

.highlight {
  background: var(--cream);
  border-left: 4px solid var(--orange);
  color: var(--ink) !important;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 8px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-light {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.btn-light:hover {
  background: #cfe8e8;
}

.two-col,
.three-col {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.three-col {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.rule {
  background: var(--teal-soft);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  border-top: 4px solid var(--teal);
}

.rule p {
  margin-bottom: 0.5rem !important;
}

.rule ul {
  margin-bottom: 0;
}

/* Cartes des équipes */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.team-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.team {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem;
  border-top: 4px solid var(--teal);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.team h3 {
  font-size: 1rem;
  color: var(--teal-dark);
  letter-spacing: 0.02em;
}

.addr {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.contact-line {
  font-size: 0.95rem;
  word-break: break-word;
}

.contact-line a {
  font-weight: 600;
}

.zone {
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #cfe0e0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Listes de documents et de liens */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.doc {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem;
  border-top: 4px solid var(--teal);
}

.doc.featured {
  border-top-color: var(--orange);
}

.doc.wide {
  grid-column: 1 / -1;
}

.doc h2 {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--teal-dark);
  margin-bottom: 0.5rem;
}

.doc p {
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.doc p:last-child {
  margin-bottom: 0;
}

.link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pills-label {
  font-size: 0.85rem !important;
  margin-bottom: 0.3rem !important;
}

.pill {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background var(--ease), color var(--ease);
}

.pill:hover {
  background: var(--teal);
  color: #fff;
}

.inline-icon {
  height: 1.2em;
  width: auto;
  vertical-align: -0.2em;
  margin-right: 0.2rem;
}

.big-phone {
  font-size: 1.8rem !important;
  font-weight: 700;
  margin-bottom: 0.2rem !important;
}

.big-phone a {
  color: var(--teal-dark);
}

.notice-block {
  align-items: center;
}

.notice-block p {
  margin: 0;
  font-weight: 600;
}

.prose p {
  line-height: 1.75;
}

.center {
  text-align: center;
}

@media (max-width: 800px) {
  .hero-small {
    padding: 1.75rem 0 3.5rem;
  }

  .team-grid,
  .team-grid.two,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .btn-row .btn {
    width: 100%;
    text-align: center;
  }
}
