/* =========================================================
   Feuille de style COMMUNE à toutes les pages.
   Direction visuelle et polices reprises de l'ancien site
   (voir CLAUDE.md, sections "Direction visuelle" et
   "Structure de la page d'accueil").
   ========================================================= */

/* --- Polices (fichiers dans fonts/, woff2 uniquement) --- */

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-v19-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-v19-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-v19-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-v19-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-v21-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-v21-latin-700italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-v40-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  line-height: 1.5;
  color: #333333;
  background: #ffffff;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Pages avec une mise en page en grille (accueil, contact...) :
   elles ont besoin de plus de largeur que les pages de texte courant. */
body.page-accueil main,
body.page-large main {
  max-width: 1280px;
}

/* Lien d'évitement : caché tant qu'il n'a pas le focus clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: #1a1a1a;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

header {
  border-bottom: 1px solid #dddddd;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
/* La nav occupe toujours sa propre ligne, sous le logo et le bouton
   Doctolib, sur tous les écrans (pas de propriété "order" : l'ordre
   visuel suit l'ordre du HTML). */
.header-inner nav {
  flex-basis: 100%;
}
.site-title {
  margin: 0;
}
.site-title a {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.6rem;
  color: #1a3d3d;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
}
nav a {
  text-decoration: none;
  color: #1a1a1a;
}
nav a[aria-current="page"] {
  text-decoration: underline;
  font-weight: 600;
}

/* Bouton "Menu" : n'existe visuellement que si le JavaScript a retiré
   l'attribut hidden et ajouté la classe menu-js au nav (voir js/main.js).
   Sans JavaScript, l'attribut hidden le masque et la liste reste visible. */
.menu-toggle {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #1a3d3d;
  background: #ffffff;
  border: 2px solid #1a4545;
  border-radius: 4px;
  cursor: pointer;
}

@media (max-width: 719.98px) {
  nav.menu-js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
  }
  nav.menu-js #menu-principal {
    display: none;
  }
  nav.menu-js .menu-toggle[aria-expanded="true"] + #menu-principal {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  nav.menu-js .menu-toggle[aria-expanded="true"] + #menu-principal li {
    width: 100%;
  }
}

@media (min-width: 720px) {
  nav.menu-js .menu-toggle {
    display: none;
  }
}

/* Bouton Doctolib : image-lien, réutilisé dans l'en-tête et le bloc contact */
.doctolib-link {
  display: inline-block;
  line-height: 0;
}
.doctolib-link img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 100%;
}

footer {
  background: #1a4545;
  color: #ffffff;
  border-top: 1px solid #dddddd;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  text-align: center;
}
footer a {
  color: #7dd3fc;
}
footer a:focus-visible {
  outline-color: #ffffff;
}

/* Champ honeypot anti-spam : masqué visuellement, mais pas avec
   display:none pour rester détectable par certains outils robustes */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

form p {
  margin: 0 0 1rem;
}
label {
  font-weight: 600;
}
input,
textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  border: 1px solid #767676;
  border-radius: 4px;
}
button {
  font: inherit;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

form button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 44px;
  background: #1a4545;
  color: #ffffff;
  border: none;
}
form button[type="submit"]:hover,
form button[type="submit"]:focus {
  background: #2c5f5f;
}

/* --- Page d'accueil : bandeau de titre --- */
.hero {
  background: #f8f9fa;
  color: #2c5f5f;
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin: 0 0 2rem;
  border-radius: 8px;
}
.hero h1 {
  margin: 0;
}
.hero-subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 400;
}

/* --- Page d'accueil : citation --- */
.citation {
  background: #ffd8b1;
  text-align: center;
  padding: 2rem 1.5rem;
  margin: 0 0 2rem;
  border-radius: 8px;
}
.citation-text {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  color: #1a3d3d;
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}
@media (min-width: 720px) {
  .citation-text {
    font-size: 1.5rem;
  }
}
.citation-source {
  color: #555555;
  margin: 0;
  font-size: 0.95rem;
}

/* --- Page d'accueil : rangées de blocs --- */
.rangee-blocs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0 0 2rem;
}
@media (min-width: 720px) {
  .rangee-blocs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bloc-accueil {
  padding: 1.5rem;
  border-radius: 8px;
}
.bloc-accueil h1 {
  margin-top: 0;
  color: #1a3d3d;
  font-size: 1.75rem;
}
.bloc-accueil h2 {
  margin-top: 0;
  color: #1a3d3d;
  font-size: 1.25rem;
}
.bloc-accueil p,
.bloc-accueil ul,
.bloc-accueil address {
  color: #333333;
}
.bloc-accueil address {
  font-style: normal;
}
.bloc-accueil address a {
  color: #1a4545;
  text-decoration: underline;
}

.lien-suite {
  color: #1a4545;
  font-weight: 600;
  text-decoration: underline;
}

.bg-turquoise {
  background: #b8e6e6;
}
.bg-gris {
  background: #d3d3d3;
}
.bg-ciel {
  background: #87ceeb;
}
.bg-rose {
  background: #ffe4f1;
}
.bg-glace {
  background: #f0f8ff;
}
.bg-menthe {
  background: #c8e7d8;
}

.portrait-marie {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 0 1rem;
}

.parcours-liste {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.map-container iframe {
  border: 0;
  display: block;
  width: 100%;
}

/* Deux colonnes (ex. page Contact) : une seule colonne en dessous de
   720px, dans l'ordre du HTML. */
.colonnes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0 0 2rem;
}
@media (min-width: 720px) {
  .colonnes {
    grid-template-columns: 1fr 1fr;
  }
}

/* Focus visible, contraste suffisant sur fond clair et sur le bouton foncé */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
