/* =========================================================
   doucheautobronzante.fr — feuille de style unique
   Palette imposée :
   #000 #FFF #ff7a18 #ff9a3c #c97a2b #4a2a16 #6b3a1e #f3e3d3
   Objectifs : rapidité (aucune ressource externe), accessibilité,
   responsive mobile-first, images pleine largeur sur mobile.
   ========================================================= */

:root {
  --noir: #000;
  --blanc: #fff;
  --orange: #ff7a18;
  --orange-clair: #ff9a3c;
  --tan: #c97a2b;
  --brun-fonce: #4a2a16;
  --brun: #6b3a1e;
  --creme: #f3e3d3;
  --creme-clair: #fbf5ee;
  --ombre: 0 6px 22px rgba(74, 42, 22, .12);
  --ombre-forte: 0 10px 30px rgba(74, 42, 22, .18);
  --rayon: 14px;
  --largeur: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--brun-fonce);
  background: var(--blanc);
  line-height: 1.7;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--tan); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--orange); }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 20px; }

/* --- Accessibilité : lien d'évitement --- */
.evitement {
  position: absolute; left: -9999px; top: 0;
  background: var(--brun-fonce); color: var(--blanc);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.evitement:focus { left: 0; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* --- En-tête --- */
.entete {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--creme);
  box-shadow: 0 2px 12px rgba(74, 42, 22, .06);
}
.entete .conteneur { display: flex; align-items: center; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo:hover { color: inherit; }
.logo img { width: 34px; height: 34px; }
.logo-texte { font-weight: 800; font-size: 1.18rem; color: var(--brun-fonce); letter-spacing: -.2px; }
.logo-texte b { color: var(--orange); font-weight: 800; }

/* --- Fil d'Ariane --- */
.fil { background: var(--creme-clair); border-bottom: 1px solid var(--creme); }
.fil ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 10px 0; font-size: .9rem;
}
.fil li { display: flex; align-items: center; gap: 6px; color: var(--brun); }
.fil li + li::before { content: "›"; color: var(--tan); }
.fil a { color: var(--brun); text-decoration: none; }
.fil a:hover { color: var(--orange); text-decoration: underline; }
.fil li[aria-current="page"] { color: var(--tan); font-weight: 600; }

/* --- Héros --- */
.heros {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(255,154,60,.55), transparent 60%),
    linear-gradient(135deg, var(--orange) 0%, var(--orange-clair) 55%, var(--tan) 100%);
  color: var(--blanc);
  padding: 56px 0 64px;
}
.heros h1 { color: var(--blanc); margin: 0 0 14px; font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.15; }
.heros p { font-size: 1.12rem; max-width: 60ch; margin: 0 0 10px; color: #fff; }
.heros .accroche-forte { font-size: 1.2rem; }
.heros-grille { display: grid; grid-template-columns: 1.25fr .9fr; gap: 36px; align-items: center; }
.heros-illu img { width: 100%; border-radius: var(--rayon); box-shadow: var(--ombre-forte); }

/* --- Sections --- */
main { display: block; }
section { padding: 40px 0; }
h1, h2, h3, h4 { color: var(--brun-fonce); line-height: 1.25; font-weight: 800; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 1.6em 0 .5em; position: relative; padding-left: 16px; }
h2::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 6px; border-radius: 6px; background: linear-gradient(var(--orange), var(--tan)); }
h3 { font-size: 1.22rem; margin: 1.4em 0 .4em; color: var(--brun); }
h4 { font-size: 1.06rem; margin: 1.2em 0 .3em; color: var(--brun); }
p { margin: 0 0 1.1em; }

.chapo {
  font-size: 1.14rem; color: var(--brun);
  background: var(--creme-clair);
  border-left: 6px solid var(--orange);
  padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 0 0 1.6em;
}

/* --- Encadré réponse directe (position zéro) --- */
.reponse-directe {
  background: var(--creme); border: 2px solid var(--tan);
  border-radius: var(--rayon); padding: 18px 22px; margin: 0 0 1.6em;
}
.reponse-directe p:last-child { margin-bottom: 0; }

/* --- Grille de cartes (régions / départements / villes) --- */
.grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 24px 0; padding: 0; list-style: none; }
.carte {
  background: var(--blanc); border: 1px solid var(--creme);
  border-radius: var(--rayon); box-shadow: var(--ombre);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
}
.carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); }
.carte a {
  display: block; padding: 20px 20px; text-decoration: none; color: var(--brun-fonce);
  height: 100%;
}
.carte a::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--orange-clair)); margin-bottom: 12px; }
.carte .nom { font-weight: 800; font-size: 1.12rem; display: block; margin-bottom: 4px; }
.carte .compl { color: var(--brun); font-size: .92rem; }
.carte.inactive { opacity: .72; }
.carte.inactive .contenu { display: block; padding: 20px; }
.carte.inactive .nom { color: var(--brun); }
.carte.inactive .badge { display: inline-block; margin-top: 8px; font-size: .78rem; background: var(--creme); color: var(--brun); padding: 3px 10px; border-radius: 999px; font-weight: 700; }

/* --- Tableaux --- */
.tableau-enveloppe { overflow-x: auto; margin: 24px 0; }
table {
  border-collapse: collapse; width: 100%; max-width: 980px;
  margin: 0 auto; border: 2px solid var(--tan);
  background: var(--blanc); font-size: 1rem;
}
caption { caption-side: top; text-align: left; font-weight: 700; color: var(--brun); padding: 0 0 10px; }
th, td { border: 2px solid var(--creme); padding: 12px 14px; text-align: left; vertical-align: top; }
thead th { background: linear-gradient(135deg, var(--orange), var(--tan)); color: var(--blanc); border-color: var(--tan); font-weight: 800; }
tbody tr:nth-child(even) { background: var(--creme-clair); }
tbody th[scope="row"] { background: var(--creme); font-weight: 700; color: var(--brun-fonce); }

/* --- Listes --- */
.contenu ul, .contenu ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.contenu li { margin: .4em 0; }
.contenu ul li::marker { color: var(--orange); }
.contenu ol li::marker { color: var(--tan); font-weight: 700; }

/* --- FAQ --- */
.faq details {
  border: 1px solid var(--creme); border-radius: 12px; background: var(--creme-clair);
  padding: 4px 18px; margin: 0 0 12px;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--brun-fonce); padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--orange); font-weight: 800; margin-right: 10px; }
.faq details[open] summary::before { content: "–"; }

/* --- CTA --- */
.cta {
  background: linear-gradient(135deg, var(--brun) 0%, var(--brun-fonce) 100%);
  color: var(--blanc); border-radius: var(--rayon); padding: 30px; margin: 30px 0;
  text-align: center;
}
.cta h2 { color: var(--blanc); }
.cta h2::before { display: none; }
.cta p { color: var(--creme); }
.bouton {
  display: inline-block; background: linear-gradient(135deg, var(--orange), var(--orange-clair));
  color: #2a1608; font-weight: 800; text-decoration: none;
  padding: 13px 26px; border-radius: 999px; box-shadow: var(--ombre);
}
.bouton:hover { color: #2a1608; transform: translateY(-2px); }

/* --- Note / avertissement --- */
.note {
  background: var(--creme-clair); border: 1px dashed var(--tan);
  border-radius: 12px; padding: 16px 20px; font-size: .96rem; color: var(--brun);
  margin: 24px 0;
}

/* --- Pied de page --- */
.pied {
  background: var(--brun-fonce); color: var(--creme);
  padding: 34px 0; margin-top: 50px; font-size: .95rem;
}
.pied a { color: var(--orange-clair); }
.pied a:hover { color: var(--blanc); }
.pied p { margin: .4em 0; color: var(--creme); }
.pied .marque { font-weight: 800; color: var(--blanc); }
.pied .mentions-lien { margin-top: 10px; }
.pied small { color: #d8c3ac; }

/* --- Contenu long lisible --- */
.contenu { max-width: 820px; }
.contenu.large { max-width: var(--largeur); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .heros-grille { grid-template-columns: 1fr; }
  .heros-illu { order: -1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  section { padding: 30px 0; }
  .conteneur { padding: 0 16px; }
  .heros { padding: 40px 0 46px; }
  /* Images pleine largeur sur mobile (consigne projet) */
  .heros-illu { margin: 0 -16px; }
  .heros-illu img { width: 100%; border-radius: 0; }
  .pleine-largeur-mobile { margin-left: -16px; margin-right: -16px; }
  .pleine-largeur-mobile img { width: 100%; border-radius: 0; }
  .grille { grid-template-columns: 1fr 1fr; gap: 12px; }
  .carte a, .carte.inactive .contenu { padding: 16px; }
  table { font-size: .94rem; }
  th, td { padding: 10px; }
}

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

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

/* --- Blocs média (couverture, illustration réaliste, bannière SVG) --- */
.couverture, .banniere { width: 100%; display: block; margin: 0 0 6px; line-height: 0; }
.couverture img, .banniere svg { display: block; width: 100%; height: auto; }
.couverture img { aspect-ratio: 2 / 1; object-fit: cover; }
.illustration { margin: 28px auto; max-width: 460px; }
.illustration img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--rayon); box-shadow: var(--ombre); display: block; }
.illustration figcaption { text-align: center; font-size: .88rem; color: var(--brun); margin-top: 8px; }
@media (max-width: 640px) {
  .illustration { margin: 22px -16px; max-width: none; }
  .illustration img { border-radius: 0; }
}

/* =========================================================
   Correctifs média full-bleed (mobile & desktop) + héros photo + bandeau cookies
   ========================================================= */
html, body { overflow-x: hidden; }

/* Full-bleed robuste, quel que soit le conteneur parent */
.couverture, .banniere {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  border-radius: 0;
}
.couverture img, .banniere svg { width: 100%; height: auto; display: block; }

/* Illustration carrée : centrée sur desktop, pleine largeur sur mobile */
.illustration { margin: 30px auto; max-width: 460px; }
@media (max-width: 700px) {
  .illustration { width: 100vw; max-width: 100vw; margin: 24px calc(50% - 50vw); }
  .illustration img { border-radius: 0; }
}

/* --- Héros avec photo réaliste + surimpression texte (accueil) --- */
.heros-photo {
  position: relative; width: 100vw; margin-left: calc(50% - 50vw);
  min-height: 480px; display: flex; align-items: center; color: #fff;
  background: #4a2a16 url("../img/accueil-hero.webp") center/cover no-repeat;
}
.heros-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(44,22,8,.86) 0%, rgba(58,30,14,.66) 42%, rgba(74,42,22,.20) 100%);
}
.heros-photo .conteneur { position: relative; z-index: 1; }
.heros-txt { max-width: 640px; padding: 64px 0; }
.heros-photo h1 { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.45); margin: 0 0 16px; }
.heros-photo p { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.heros-photo .accroche-forte { font-size: 1.2rem; }
@media (max-width: 640px) {
  .heros-photo { min-height: 420px; }
  .heros-txt { padding: 42px 0; }
  .heros-photo::before { background: linear-gradient(180deg, rgba(44,22,8,.62) 0%, rgba(44,22,8,.78) 100%); }
}

/* --- Galerie d'images réalistes (accueil) --- */
.galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--rayon); box-shadow: var(--ombre); display: block; }
@media (max-width: 700px) {
  .galerie { grid-template-columns: 1fr; gap: 12px; width: 100vw; max-width: 100vw; margin: 20px calc(50% - 50vw); }
  .galerie img { border-radius: 0; aspect-ratio: 16/9; }
}

/* --- Bandeau de consentement cookies --- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  max-width: 720px; margin: 0 auto;
  background: var(--brun-fonce); color: var(--creme);
  border: 1px solid var(--brun); border-radius: var(--rayon);
  box-shadow: var(--ombre-forte); padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: .92rem; color: var(--creme); }
.cookie-banner a { color: var(--orange-clair); }
.cookie-actions { display: flex; gap: 10px; margin-left: auto; }
.cc-btn { font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px; padding: 9px 18px; border: 1px solid transparent; }
.cc-refuse { background: transparent; color: var(--creme); border-color: var(--brun); }
.cc-refuse:hover { border-color: var(--creme); }
.cc-accept { background: linear-gradient(135deg, var(--orange), var(--orange-clair)); color: #2a1608; }
.cc-accept:hover { filter: brightness(1.05); }
