/* ==========================================================
   Feuille de style du site « L’air du large »
   - Aucune ressource externe (pas de Google Fonts, etc.) :
     le site est plus rapide, plus sûr et sans bandeau cookies.
   - Les couleurs se changent ici, dans la section :root
   ========================================================== */

:root {
  --navy: #12355b;       /* bleu marine : titres, pied de page */
  --sea: #1f7a99;        /* bleu mer : liens, accents */
  --sea-dark: #165f78;
  --sand: #f6f0e6;       /* sable : fonds de sections */
  --foam: #fbf9f5;       /* blanc cassé : fond de page */
  --ink: #1d2a36;        /* texte */
  --muted: #55646f;
  --line: #e3dccd;
  --accent: #b8482a;     /* corail foncé : boutons principaux */
  --accent-dark: #983a20;
  --white: #ffffff;
  --radius: 14px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 1.0625rem/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--foam);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sea-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 760px); margin-inline: auto; }

/* Lien « aller au contenu » pour le clavier et les lecteurs d’écran */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white); padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .8rem 0; }

.brand {
  display: flex; flex-direction: column; line-height: 1.15;
  font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 700;
  color: var(--navy); text-decoration: none;
}
.brand small { font: .78rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.site-header nav a {
  display: block; padding: .45rem .8rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem;
}
.site-header nav a:hover { background: var(--sand); }
.site-header nav a[aria-current="page"] { background: var(--navy); color: var(--white); }

/* ---------- Bandeau d’accueil ---------- */
/* Le dégradé ci-dessous sert de fond de secours : la photo du bandeau d’accueil
   est définie plus bas, dans la section « Photos » (classe .hero-photo). */
.hero {
  color: var(--white);
  background: linear-gradient(135deg, #12355b 0%, #1f7a99 62%, #7fb8c9 100%);
  padding: clamp(3rem, 9vw, 6rem) 0;
}
.hero h1 { color: var(--white); margin-bottom: .3em; }
.hero .lead { font-size: 1.25rem; max-width: 40ch; opacity: .96; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; margin-bottom: .8rem; opacity: .9; }

.page-title { background: var(--sand); padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.page-title h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .3em; }
.page-title p { margin: 0; color: var(--muted); max-width: 60ch; }

/* ---------- Sélecteur de langue FR | EN ---------- */
.site-header nav .lang-switch {
  display: flex; border: 2px solid var(--navy); border-radius: 999px; overflow: hidden; margin-left: .5rem;
}
.site-header nav .lang-switch a,
.site-header nav .lang-switch span {
  display: block; padding: .3rem .8rem; font-weight: 700; font-size: .9rem; letter-spacing: .04em;
  text-decoration: none; color: var(--navy); border-radius: 0;
}
.site-header nav .lang-switch a:hover { background: var(--sand); }
.site-header nav .lang-switch span[aria-current] { background: var(--navy); color: var(--white); }

/* ---------- Boutons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
}
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); color: var(--white); }
.btn-light { background: rgba(255,255,255,.12); color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-light:hover { background: var(--white); color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section.alt { background: var(--sand); }
.section.center { text-align: center; }

.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.8rem; margin-bottom: .4rem; }
.card a.more { margin-top: auto; font-weight: 600; }

.tag {
  display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 600;
  background: var(--sand); color: var(--navy); border-radius: 999px; padding: .15rem .7rem; margin-bottom: .6rem;
}
.meta { color: var(--muted); font-size: .92rem; }

/* ---------- Emplacements de photos (à remplacer par vos images) ---------- */
.ph {
  aspect-ratio: 4 / 3; margin: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1rem; color: var(--muted); font-size: .95rem;
  background: repeating-linear-gradient(45deg, #efe8d8, #efe8d8 12px, #f6f0e6 12px, #f6f0e6 24px);
  border: 2px dashed #cdbf9f; border-radius: var(--radius);
}
.photos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.photos img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Listes ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding-left: 1.6rem; position: relative; margin-bottom: .35rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--sea); font-weight: 700; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; margin-bottom: .6rem;
}

/* ---------- Articles ---------- */
.article { padding: 2.5rem 0 3rem; }
.article h2 { margin-top: 1.8em; }
.article .note {
  background: var(--sand); border-left: 4px solid var(--sea); padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 1.6rem 0;
}
.back { display: inline-block; margin-bottom: 1rem; font-weight: 600; }

/* ---------- Formulaire ---------- */
form.demande { display: grid; gap: 1.1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1.5px solid #b9b19f; border-radius: 10px; background: var(--white); color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--sea); outline: 3px solid rgba(31,122,153,.25); }
textarea { min-height: 8rem; resize: vertical; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .4rem; width: 1.1rem; height: 1.1rem; flex: none; }
.hint { font-size: .9rem; color: var(--muted); margin: .25rem 0 0; }
/* Champ piège anti-spam : invisible pour les humains */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Texte réservé aux lecteurs d’écran */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.narrow-left { max-width: 760px; margin-bottom: 2rem; }

/* ---------- Pense-bête : champs à compléter ---------- */
.todo { background: #fff2a8; color: #4a3b00; padding: 0 .3em; border-radius: 4px; }

/* ---------- Photos ---------- */
/* Bandeau d’accueil avec photo : voile bleu pour garder le texte lisible */
.hero-photo {
  background:
    linear-gradient(rgba(18, 53, 91, .66), rgba(18, 53, 91, .40)),
    url("../images/treport-panorama.jpg") center 70% / cover no-repeat;
}

/* Vignette en haut d’une carte d’article */
.card .thumb {
  width: calc(100% + 2.8rem); max-width: none; aspect-ratio: 16 / 10; object-fit: cover;
  margin: -1.4rem -1.4rem 1rem; border-radius: var(--radius) var(--radius) 0 0;
}

/* Photos dans les articles */
.fig { margin: 1.8rem 0; }
.fig img { width: 100%; height: auto; border-radius: var(--radius); }
.fig figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.fig-hero { margin-top: 0; }
.fig-hero img { aspect-ratio: 16 / 9; object-fit: cover; object-position: center 55%; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: #dbe6ef; padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
.site-footer a { color: #ffffff; }
.site-footer .cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h2 { font-size: 1.1rem; color: var(--white); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.2); margin-top: 1.5rem; padding-top: 1rem; font-size: .9rem; }

@media print {
  .site-header nav, .site-footer, .cta-row, form { display: none; }
  body { background: #fff; }
}
