/* ==========================================================
   L'océan vivant — Pays bigouden sud
   Maquette Figma : Loceanaimonslevivant (1440px)
   ========================================================== */

/* ---------- Polices ---------- */
@font-face {
  font-family: "Vista Sans OTCE";
  src: url("fonts/VistaSansOT-Reg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vista Sans OTCE";
  src: url("fonts/VistaSansOT-RegItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Vista Sans OTCE";
  src: url("fonts/VistaSansOT-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Permanent Marker";
  src: url("fonts/PermanentMarker-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --accent: #EF3F17;
  --sombre: #1D190B;
  --fond: #EAE8E2;
  --eau: #7A8FC4;
  --blanc: #FFFFFF;
  --corps: "Vista Sans OTCE", "Segoe UI", Verdana, sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: var(--corps);
  font-size: 15px;
  line-height: 25px;
  color: var(--sombre);
  background-color: var(--fond);
}

/* Texture papier globale, par-dessus toute la page.
   position: absolute (pas fixed) : mix-blend-mode + position:fixed
   ne se compose pas correctement sur Safari iOS (l'overlay devient opaque
   et masque tout le contenu, y compris le hero). */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1000;
  background-image: url("assets/grain.png");
  background-repeat: repeat;
  background-size: 340px 340px;   /* tuile réduite : grain plus fin */
  mix-blend-mode: multiply;
  pointer-events: none;
}

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

a { color: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 380px;
  height: 85vh;            /* 969/1440 */
  max-height: 969px;
  background-color: #d9cba8; /* fallback sans image */
  background-image: url("assets/hero.jpg");
  background-size: cover;
  background-position: center bottom;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
}
.hero-text{
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  font-family: var(--marker);
  font-size: 20px;
  text-align: center;
}
.mum-text{
  left: -220px;
  position: relative;
  width: 180px;
  top: -3vh;
}
.dad-text{
  right: -300px;
  position: relative;
  width: 180px;
  top: 3.5vh;
 
}
.hero-logo { 
  width: auto;
  height: 80px;
  position: fixed;
  top: 0;
  z-index: 2000;}

.hero-urgences {
  display: flex;
  gap: 10px;
  position: fixed;
  z-index: 1000;
  right: 20px;
  top: 20px;
  
}

.urgence-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 56px;
  padding: 10px;
  background: var(--accent);
  border-radius: 10px;
  color: var(--blanc);
  text-decoration: none;
}
.urgence-badge:hover { background: #d63510; }

.urgence-label {
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.urgence-number {
  font-weight: 700;
  font-size: 28px;
  line-height: 30px;
}

/* ---------- Navigation ---------- */
.sticky-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 364px;
  margin: -46px auto 0;      /* chevauche hero (y=923) et section sombre */
  padding: 5px;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 15px;
}

.sticky-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 84px;
  height: 67px;
  padding: 7px 9px 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
  color: var(--sombre);
  text-align: center;
  transition: background 0.15s ease;
}
.sticky-nav-item:hover { background: rgba(255, 255, 255, 0.85); }
.sticky-nav-item img { flex-shrink: 0; margin: auto 0; }

/* ---------- Sections communes ----------
   Bords déchirés : bandes SVG en haut/bas (::before / ::after),
   aplat de couleur entre les deux. Aucune image bitmap nécessaire. */
.section { position: relative; z-index: 0; }

.section-sombre {
  color: var(--fond);
  background-image: linear-gradient(var(--sombre), var(--sombre));
  background-repeat: no-repeat;
  background-size: 100% calc(100% - 156px);
  background-position: 0 78px;
}
.section-sombre::before,
.section-sombre::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: -1;
  background-size: 100% 100%;
}
.section-sombre::before { top: 20px; background-image: url("assets/edge-sombre-haut.svg"); }
.section-sombre::after  { bottom: 0; background-image: url("assets/edge-sombre-bas.svg"); }

.section-sable {
  color: var(--sombre);
  background-image: url("assets/grain.png"), linear-gradient(#EFC98A, #EFC98A);
  background-repeat: repeat, no-repeat;
  background-size: auto, 100% calc(100% - 206px);
  background-position: 0 0, 0 128px;
}
.section-sable::before,
.section-sable::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  z-index: -1;
  background-size: 100% 100%;
}
.section-sable::before { top: 0; height: 130px; background-image: url("assets/edge-sable-haut.svg"); }
.section-sable::after  { bottom: 0; height: 80px; background-image: url("assets/edge-sable-bas.svg"); }

/* Le footer garde son bord déchiré en haut et file jusqu'en bas */
.footer.section-sable {
  background-size: auto, 100% calc(100% - 128px);
  background-position: 0 0, 0 128px;
}
.footer.section-sable::after { content: none; }

.bloc-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.titre-section {
  font-family: var(--marker);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  color: var(--fond);
  text-align: center;
}
.titre-sombre { color: var(--sombre); }

/* ---------- Checklists ---------- */
.checklist {
  list-style: none;
  width: 350px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist > li {
  position: relative;
  padding-left: 33px;
  min-height: 25px;
}

.checklist > li:not(.item-avec-lien)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 23px;
  height: 24px;
  background-image: url("assets/icon-checkbox.svg");
  background-size: 23px 24px;
  background-repeat: no-repeat;
}

.checklist-sombre > li:not(.item-avec-lien)::before {
  background-image: url("assets/icon-checkbox-dark.svg");
}

/* Liens "marker" rouges */
.item-avec-lien { padding-left: 33px; }

.lien-marker {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--marker);
  font-size: 16px;
  line-height: 25px;
  color: var(--accent);
  text-decoration: none;
}
.lien-marker:hover span { text-decoration: underline; }
.lien-marker img { flex-shrink: 0; }

.lien-tel {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Section Avant de partir ---------- */
.section-avant {
  margin-top: -180px;        /* chevauche le hero comme dans la maquette */
  padding: 20px 40px 255px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.titre-principal {
  margin-top: 20px;          /* espace sous la nav sticky */
  margin-bottom: 60px;
}
.titre-principal img { width: 300px; height: auto; }

.intro {
  max-width: 676px;
  text-align: center;
  color: var(--blanc);
  margin-bottom: 40px;
}

.section-avant .bloc-conseils {
  width: 350px;
  max-width: 100%;
  padding-top: 60px;
}

/* ---------- Section Plage ---------- */
.section-plage { padding: 130px 20px 140px; margin-top: -200px;}

.plage-inner {
  max-width: 1081px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.plage-inner .bloc-conseils {
  width: 350px;
  padding-left: 0;
}

.titre-carte {
  font-family: var(--marker);
  font-weight: 400;
  font-size: 24px;
  line-height: 30px;
  color: var(--accent);
  max-width: 380px;
margin: 0 auto;
  text-align: center;
  padding-bottom: 40px;
}

.plage-carte {width: 100%;
  max-width: 540px;
  margin: 0 auto;}
.plage-carte img { background: transparent; }

/* ---------- Section Baignade ---------- */
.section-baignade {
  padding: 20px 20px 60px;
  overflow: hidden;
}

.section-baignade .bloc-header { margin-bottom: 40px; }

.baignade-colonnes {
  display: flex;
  justify-content: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.baignade-col { width: 350px; max-width: 100%; }

.etape-numero {
  font-family: var(--marker);
  font-size: 40px;
  line-height: 1.15;
  text-align: center;
}

.etape-titre {
  font-family: var(--marker);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 10px;
}

.vague {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 254px;              /* partie visible de la vague (Figma : y=787 sur 1041) */
  pointer-events: none;
  z-index: 0;
}
.vague img {
  width: 100%;
  height: auto;
  min-width: 1440px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
}

/* ---------- Section Activités ---------- */
.section-activites { padding: 90px 20px 270px; }

.activites-colonnes {
  max-width: 1146px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 60px;
}

.activite-col {
  width: 342px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.activite-pill {
  align-self: center;
  background: var(--accent);
  color: var(--blanc);
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 16px;
  line-height: 17px;
  margin-bottom: 35px;
}

/* ---------- Popup drapeaux (CSS pur, via :target) ---------- */
.popup-conteneur {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}
.popup-conteneur:target {
  visibility: visible;
  pointer-events: auto;
}

.popup-fond {
  position: absolute;
  inset: 0;
  background: rgba(29, 25, 11, 0);
  transition: background 0.35s ease;
  cursor: default;
}
.popup-conteneur:target .popup-fond { background: rgba(29, 25, 11, 0.45); }

.popup {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 415px;
  max-width: 92vw;
  background: var(--blanc);
  border-radius: 17px 0 0 17px;
  padding: 60px 47px;
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform 0.35s ease;
  box-shadow: -8px 0 30px rgba(29, 25, 11, 0.25);
  text-decoration: none;
  cursor: pointer;
}
.popup-conteneur:target .popup { transform: translateX(0); }

.popup-fermer {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 30px;
  line-height: 1;
  color: var(--sombre);
  text-decoration: none;
}
.popup-fermer:hover { color: var(--accent); }

.popup-titre {
  font-family: var(--marker);
  font-weight: 400;
  font-size: 20px;
  line-height: 25px;
  color: var(--accent);
  text-align: center;
  max-width: 230px;
  margin: 0 auto 50px;
}

.drapeaux-liste {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}
.drapeaux-liste li {
  width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.drapeaux-liste p { text-align: center; }
.drapeau { display: block; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .popup, .popup-fond { transition: none; }
}

/* ---------- Footer ---------- */
.footer {
  padding: 150px 20px 160px;
  text-align: center;
  margin-top: -200px;
}

.footer-message {font-family: "permanent marker";
  max-width: 300px;
  margin: 0 auto;
  padding-bottom: 80px;}

.footer-copyright { font-size: 12px; }

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1160px) {
  .plage-inner {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }
  .activites-colonnes {
    flex-wrap: wrap;
    justify-content: center;
  }

}

@media (max-width: 820px) {
  .baignade-colonnes {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }
  .section-baignade { padding: 20px 20px 60px; }
  .section-activites { padding: 70px 20px 250px; }
  .footer { padding: 160px 20px 120px;
    margin-top: -200px; } 
  .dad-text{
      right: -250px;
  }
}

@media (max-width: 640px) {
  .hero {
    height: 65vh;
    background-size: cover;
    background-position: center ;
  }
  .mum-text, .dad-text{
   display: none;
  }
  .hero-logo {height: 75px; }
  .hero-urgences { 
    padding: 20px;justify-content: space-between;
  width: auto;
    position: fixed;
    top: 0px;
    right: 20px;
    left: 20px;}
  
  .sticky-nav {
    width: calc(100% - 24px);
    max-width: 364px;
    margin-top: -38px;
  }
  .sticky-nav-item {
    width: 25%;
    padding: 6px 4px 5px;
    font-size: 10px;
  }
  .sticky-nav-item img { transform: scale(0.85); }

  .section-avant {
    margin-top: -110px;
    padding-top: 40px;
  }
  .titre-principal  { margin-top: 0; }
  .titre-principal img { width: 220px; }
  .intro { margin-bottom: 0px; }

  .section-plage { padding: 60px 20px 120px; }
  .titre-carte { font-size: 20px; line-height: 26px; text-align: center;}

  .etape-numero { font-size: 32px; }

  .checklist { width: 100%; }
}
