/* ==================================================================
   responsive-fixes.css — GUYENNE ENTREPRISES — 2026-11-08
   Corrections responsive / accessibilité chargées après les CSS du site.
   Pour annuler : supprimer ce fichier ou la balise <link> correspondante.
   ===================================================================== */

/* 1. Base : pas de débordement horizontal, zoom texte iOS maîtrisé */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a, button, input, select, textarea, label { touch-action: manipulation; }

/* 2. Focus clavier visible (accessibilité) */
:focus-visible { outline: 2px solid var(--c-accent-deep, #1fd040); outline-offset: 3px; border-radius: 4px; }

/* 3. Grilles : les enfants ne débordent plus de leur colonne (cartes de la page d'accueil en tablette) */
.grid > *, .grid-2 > *, .pillars > *, .case-grid > * { min-width: 0; }

/* 4. Menu : passe en menu « burger » jusqu'à 1365 px.
   Avec 10 rubriques, le menu horizontal débordait entre 901 et ~1300 px
   (sélecteur de langue poussé hors de l'écran sur portable et tablette paysage). */
@media (min-width: 901px) and (max-width: 1365px) {
  .nav-links { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; background: #ffffff !important; display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; gap: var(--sp-5); margin: 0 !important; padding: 6rem 1.5rem 3rem !important; transform: translateY(-100%); transition: transform 0.5s var(--ease-inout), opacity 0.25s var(--ease-out); z-index: 9998 !important; pointer-events: none; opacity: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; isolation: isolate; }
  .is-menu-open .nav-links { transform: none; pointer-events: auto; opacity: 1; }
  .site-nav nav { position: static; }
  body.is-menu-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
  body.is-menu-open { overflow: hidden; }
  .site-nav { z-index: 9999 !important; }
  .nav-tools { position: relative; z-index: 10000; }
  .site-nav .brand { position: relative; z-index: 10000; }
  .nav-links a { font-size: 1.5rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* 4b. Menu horizontal à partir de 1366 px : compact, sur une seule ligne */
@media (min-width: 1366px) {
  .nav-links { gap: clamp(0.9rem, 1.3vw, 1.6rem) !important; }
  .nav-links a { white-space: nowrap; font-size: 0.86rem; }
  .site-nav .brand span:last-child { white-space: nowrap; }
}

/* 5. Menu ouvert : liens confortables au doigt (44 px) et défilement sûr en paysage */
@media (max-width: 1365px) {
  .nav-links { justify-content: flex-start !important; }
  .nav-links > li:first-child { margin-top: auto; }
  .nav-links > li:last-child { margin-bottom: auto; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.75rem; }
}

/* 6. Sélecteur de langue : cibles tactiles plus grandes */
.lang-switch button { min-width: 36px; min-height: 36px; }
@media (max-width: 900px) {
  .lang-switch button { min-width: 40px; min-height: 40px; font-size: 0.75rem; }
}

/* 7. Lisibilité mobile : texte aligné à gauche, sans césure des mots
   (le texte justifié + césure créait des « mots coupés » et des trous sur petit écran) */
@media (max-width: 700px) {
  p, .lead, li { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
}
/* Colonnes étroites (cartes, FAQ) : alignement à gauche à toutes les tailles */
.pillar p, .pillar h3, .case p, .footer-col p { text-align: left; hyphens: manual; -webkit-hyphens: manual; }

/* 8. Tailles de texte minimales (≥ 12 px) */
.pill, .case-meta-tag, .eyebrow { font-size: max(0.75rem, 12px); }
.form-row label { font-size: max(0.875rem, 14px); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; flex: none; }

/* 9. iPhone à encoche / Dynamic Island : marges de sécurité */
.site-nav {
  padding-left: max(var(--container-pad), env(safe-area-inset-left));
  padding-right: max(var(--container-pad), env(safe-area-inset-right));
}
.wa-bubble { margin-bottom: env(safe-area-inset-bottom); margin-right: env(safe-area-inset-right); }

/* 10. Mouvement réduit : pas d'animation de défilement pour qui l'a désactivée */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 11. Boutons : texte toujours centré (horizontalement et verticalement), y compris quand le bouton s'élargit */
.btn { justify-content: center; text-align: center; line-height: 1.2; }
.btn > span:first-child { display: inline-flex; align-items: center; }

/* 12. Mobile : boutons du contenu centrés sur la page, pleine largeur, texte au centre */
@media (max-width: 700px) {
  main .btn { display: flex; width: 100%; max-width: 440px; margin-inline: auto; justify-content: center; }
  main p:has(> .btn) { text-align: center; }
}
