/* Styles globaux — Breizh Social */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; }
/* Supprime le délai de 300 ms et le flash gris au toucher sur les boutons et liens */
a, button, .btn, [role="button"], label, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

a { color: inherit; }

.container-breizh {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px; /* repli pour les navigateurs sans max()/env() */
  /* max(…, env()) : évite l'encoche et les bords arrondis des téléphones (paysage notamment) */
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.98;
  margin: 0;
}

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

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--noir);
  border-bottom: 1px solid var(--granit);
}
.site-nav { padding-top: env(safe-area-inset-top); }
.site-nav .container-breizh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blanc);
  text-decoration: none;
}
.brand svg { width: 34px; height: 34px; color: var(--rouge); flex-shrink: 0; }
.brand { flex: none; }
.brand-name { white-space: nowrap; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}
.nav-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* cible tactile minimale confortable */
  box-sizing: border-box;
  text-align: center;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--rouge); color: var(--blanc); }
.btn-primary:hover { background: #a8181f; }
/* Bouton secondaire. Par défaut (pages à fond clair) : rouge, texte noir — l'ancien
   rendu (texte blanc sur transparent) était invisible hors des zones sombres. */
.btn-ghost {
  background: var(--rouge);
  color: var(--noir);
  border-color: var(--rouge);
  font-weight: 700;
}
.btn-ghost:hover { background: #e0272f; border-color: #e0272f; }
/* Sur fond sombre (barre de navigation, bandeau d'accueil, bandeau d'appel) : transparent, texte blanc. */
.site-nav .btn-ghost,
.hero .btn-ghost,
.incoming-call-banner .btn-ghost {
  background: transparent;
  color: var(--blanc);
  border-color: var(--granit-clair);
  font-weight: inherit;
}
.site-nav .btn-ghost:hover,
.hero .btn-ghost:hover,
.incoming-call-banner .btn-ghost:hover { background: transparent; border-color: var(--blanc); }

/* L'attribut hidden doit TOUJOURS cacher : sans cette règle, tout élément dont le CSS
   définit un display (flex, grid, block...) restait affiché malgré hidden — par ex. la
   visionneuse de stories, qui recouvrait la page d'un écran noir en permanence. */
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  background: var(--noir);
  color: var(--blanc);
  overflow: hidden;
}
.hero .container-breizh {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: 640px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.hero-eyebrow {
  color: var(--rouge);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  margin-bottom: 26px;
}
.hero h1 em {
  font-style: normal;
  color: var(--rouge);
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: #d9d7d0;
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-flag-wrap {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 560px;
}
.flag-pole {
  position: absolute;
  left: -18px;
  top: -30px;
  bottom: -30px;
  width: 8px;
  background: linear-gradient(90deg, #6b5636, #a9895a 40%, #6b5636);
  border-radius: 4px;
}
.hero-flag-wrap svg.flag,
.hero-flag-wrap img.flag-photo {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: left center;
}
.hero-flag-wrap img.flag-photo {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  filter: url(#waveDistortShared) drop-shadow(6px 10px 14px rgba(0,0,0,0.4));
}

.hero-ermine {
  position: absolute;
  left: -46px;
  bottom: -28px;
  width: 108px;
  z-index: 2;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.4));
}
.hero-ermine svg { width: 100%; height: auto; display: block; }
@media (max-width: 880px) {
  .hero-ermine { width: 76px; left: -20px; bottom: -16px; }
}

/* ---------- Sections fonctionnalités : bandes pleine largeur ---------- */
.feature-row {
  border-bottom: 1px solid #e4e2da;
}
.feature-row .container-breizh {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.feature-row.dark {
  background: var(--noir);
  color: var(--blanc);
  border-bottom-color: var(--granit);
}
.feature-row.dark .feature-desc { color: #cfcdc5; }
.feature-name {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}
.feature-desc { max-width: 52ch; font-size: 1.08rem; color: #4a4a46; }
.feature-icon { width: 46px; height: 46px; color: var(--rouge); margin-bottom: 18px; }
.feature-row:nth-child(even) .container-breizh { grid-template-columns: 1.4fr 1fr; }
.feature-row:nth-child(even) .feature-text { order: 2; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--noir);
  color: #b9b7af;
  padding: 56px 0 32px;
}
.site-footer .container-breizh {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer a { color: #b9b7af; text-decoration: none; }
.site-footer a:hover { color: var(--blanc); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.92rem; }
.footer-mark { color: var(--rouge); width: 28px; height: 28px; }
.footer-bottom {
  max-width: var(--container-max);
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--granit);
  font-size: 0.85rem;
  color: #7d7b74;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  /* Une seule colonne : en flex (colonne) plutôt qu'en grille à 1 colonne, plus robuste d'un navigateur à l'autre. */
  .hero .container-breizh,
  .feature-row .container-breizh,
  .feature-row:nth-child(even) .container-breizh {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero .container-breizh { min-height: auto; padding-top: 56px; }
  .hero-flag-wrap { align-self: flex-start; justify-self: start; width: 100%; max-width: 420px; margin-top: 8px; }
  .feature-row .container-breizh { padding-top: 48px; padding-bottom: 48px; }
  .feature-row:nth-child(even) .feature-text { order: 0; }
  .feature-desc { max-width: none; }
}

/* ---------- Petits écrans et appareils tactiles ---------- */
/* Sur écran tactile, un champ de moins de 16 px fait « zoomer » Safari à la saisie. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea { font-size: max(16px, 1rem); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container-breizh { padding-left: 16px; padding-right: 16px; }
  .container-breizh { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .site-nav .container-breizh { padding-top: 8px; padding-bottom: 8px; }
  .brand-name { font-size: 1.15rem; }
  .brand svg { width: 30px; height: 30px; }
  .site-nav .btn { padding: 8px 12px; font-size: 0.88rem; min-height: 40px; }
  .nav-actions { flex: 1 1 auto; gap: 8px; } /* occupe la ligne : les boutons restent côte à côte, alignés à droite */
  .btn { padding: 11px 20px; }
}

/* Très petits écrans (≈ 320 px) : le nom de la marque cède la place aux boutons */
@media (max-width: 380px) {
  .site-nav .brand-name { display: none; }
}

/* Texte long (adresses, mots collés) : ne jamais déborder de l'écran */
.chat-bubble-text, .event-title, .event-desc, .story-bubble-label { overflow-wrap: anywhere; }

