/* ============================================================
   Horyond Agency : refonte 2026 (nouveaux composants)
   Complete direction-c/site.css sans le modifier.
   ============================================================ */

/* --- Skip link (visible au focus clavier seulement) --- */
.ho-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ho-ink);
  color: var(--ho-on-voltage);
  padding: 10px 16px;
  font-family: var(--ho-font-mono);
  font-size: 12px;
  text-decoration: none;
}
.ho-skip:focus { left: 8px; top: 8px; }

/* --- Lien de langue (remplace le toggle JS) --- */
.ho-lang__link {
  font-family: var(--ho-font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ho-ink);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--ho-rule-minor);
  transition: color var(--ho-dur-2) var(--ho-ease), border-color var(--ho-dur-2) var(--ho-ease);
}
.ho-lang__link:hover { color: var(--ho-voltage); border-color: var(--ho-voltage); }

/* --- Mega-menu 2 familles (cache par defaut, grille au survol/focus) --- */
.ho-drop__panel--mega {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  min-width: 460px;
  padding: 18px 20px;
}
.ho-drop:hover .ho-drop__panel--mega,
.ho-drop:focus-within .ho-drop__panel--mega { display: grid; }
.ho-drop__col { display: flex; flex-direction: column; gap: 2px; }
.ho-drop__fam {
  font-family: var(--ho-font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ho-label);
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ho-rule-minor);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.ho-drop__fam em { color: var(--ho-voltage); font-style: normal; }
.ho-drop__all {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ho-rule-minor);
  font-family: var(--ho-font-mono);
  font-size: 11px;
  letter-spacing: .06em;
}

/* Feuille de navigation (tactile <= 1024px) : le mega-menu devient une simple
   liste verticale des services sous "Services" (pas de grille 2 colonnes ni
   min-width 460px, pas d'en-tetes de famille). Deploye en permanence dans la feuille. */
@media (max-width: 1024px) {
  .ho-drop__panel--mega {
    display: flex; flex-direction: column; gap: 0;
    min-width: 0; padding: 2px 0 0;
  }
  .ho-drop__col { gap: 0; }
  .ho-drop__fam, .ho-drop__all { display: none; }
  /* Sous-services : ligne tactile >= 44px. */
  .ho-drop__panel--mega a { display: flex; align-items: center; min-height: 44px; padding: 8px 0 8px 14px; }
  /* Switch de langue (seul controle de nav en haut) : cible tactile >= 44px. */
  .ho-lang__link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --- Fix alignement : le canvas dither remplit et centre son cadre --- */
.ho-card__well canvas,
.ho-step__well canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Fond de cadre legerement plus fonce (sans changer la DA) */
.ho-card__well,
.ho-step__well { background: #DAD6C9; }

/* --- Grille de 4 cartes services --- */
.ho-cards--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--ho-gap); }
@media (max-width: 1024px) { .ho-cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .ho-cards--4 { grid-template-columns: 1fr; } }

/* --- Tableau de bord (differenciateur) --- */
.ho-dash__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .ho-dash__grid { grid-template-columns: 1fr; gap: 28px; } }
.ho-dash__well {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ho-ink);
  border: 1px solid var(--ho-rule-major);
  overflow: hidden;
}
.ho-dash__well canvas { width: 100%; height: 100%; display: block; }
.ho-dash__well svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ho-dash__list { margin-top: 18px; }

/* --- Listes --- */
.ho-ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.ho-ul li {
  position: relative;
  padding-left: 24px;
  color: var(--ho-text-strong);
  font-size: var(--ho-fs-body);
  line-height: 1.5;
}
.ho-ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 9px;
  background: var(--ho-voltage);
}
.ho-ul--check li::before { background: var(--ho-success); }
.ho-ul--no li::before { background: var(--ho-error); }

/* --- Arguments "Pourquoi" : h3 (hierarchie correcte) au meme rendu que l'ancien h4 --- */
.ho-arg h3 {
  margin: 12px 0 8px;
  font-family: var(--ho-font-display);
  font-variation-settings: 'wdth' 104;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

/* --- Sections editoriales 2 colonnes (pages simple : titre a gauche, contenu a droite) --- */
.ho-editorial {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px 56px;
  align-items: start;
}
.ho-editorial__head { position: sticky; top: 90px; }
/* Colonne de 300px : le h2 plein format (54px) y casse les mots longs
   ("Responsabilite", "l'abonnement"). Taille reduite + cesure francaise. */
.ho-editorial__head h2 {
  margin: 0;
  font-size: clamp(26px, 20px + 1.25vw, 38px);
  hyphens: auto;
  -webkit-hyphens: auto;
}
.ho-editorial__head .ho-eyebrow { margin-bottom: 10px; }
.ho-editorial__body > .ho-lead:first-child { margin-top: 0; }
.ho-editorial__body .ho-lead + .ho-lead { margin-top: 20px; }
@media (max-width: 820px) {
  .ho-editorial { grid-template-columns: 1fr; gap: 12px; }
  .ho-editorial__head { position: static; }
}

/* --- Hero des pages internes : meme structure que le hero home (fini le "colle a gauche") --- */
.ho-h1--page { font-size: var(--ho-fs-h1-page); margin: 0; }
.ho-hero--page .ho-hero__text { gap: 22px; padding-top: 56px; padding-bottom: 48px; }
.ho-hero--page .ho-hero__well { min-height: 360px; }
/* <= 880px : le well est masque (voir site.css) car il passerait sous le texte. */

/* --- Thème Horyond Non Profit : accent vert, DA pixel conservee --- */
.ho-theme-np {
  --ho-voltage: #147A43;
  --ho-voltage-deep: #0F5C33;
  --ho-on-voltage-link: #BDF0D2;
}

/* --- Formulaire embarque (Tally) --- */
.ho-form {
  position: relative;
  margin-top: 22px;
  border: 1px solid var(--ho-rule-major);
  background: #fff;
  padding: 10px 14px;
}
.ho-form iframe { width: 100%; display: block; min-height: 500px; border: 0; }
/* Masque le badge "Made with Tally" (coin bas-droite de l'iframe, hors-plan free).
   Applique seulement quand l'iframe Tally est reellement injectee (embed actif) ;
   pointer-events:none => les vrais boutons (Next/Submit, cale a gauche) restent
   cliquables meme si survoles. */
.ho-form:has(.ho-embed[data-embed-active])::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 210px;
  height: 92px;
  background: #fff;
  pointer-events: none;
}
@media (max-width: 600px) { .ho-form:has(.ho-embed[data-embed-active])::after { width: 150px; height: 80px; } }

/* --- Embeds tiers gates par le consentement (Google Calendar, Tally) --- */
.ho-embed { position: relative; }
.ho-embed iframe { width: 100%; display: block; border: 0; }
.ho-embed__ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
  background: var(--ho-paper-shade, #DAD6C9);
}
.ho-embed__ph canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.ho-embed__panel {
  position: relative;
  max-width: 34ch;
  margin: 0 auto;
  padding: 22px;
  text-align: center;
  background: var(--ho-paper);
  border: 1px solid var(--ho-rule-major);
}
.ho-embed__note { font: 400 12.5px/1.6 var(--ho-font-mono); color: var(--ho-card-body); margin-bottom: 14px; }

/* --- Bandeau de consentement cookies --- */
.ho-consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(680px, calc(100vw - 28px));
  background: var(--ho-paper);
  border: 1px solid var(--ho-ink);
  box-shadow: 6px 6px 0 rgba(6, 8, 10, .12);
  padding: 20px 22px;
}
.ho-consent[hidden] { display: none; }
/* [hidden] doit l'emporter sur le display des .ho-btn/.ho-consent__opts */
.ho-consent [hidden] { display: none !important; }
.ho-consent__eyebrow { font: 500 var(--ho-mono-label)/1 var(--ho-font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ho-voltage); }
.ho-consent__title { margin: 8px 0 6px; font-family: var(--ho-font-display); font-variation-settings: 'wdth' 108; font-weight: 900; font-size: 20px; letter-spacing: -.02em; }
.ho-consent__txt { font: 400 13px/1.6 var(--ho-font-mono); color: var(--ho-card-body); }
.ho-consent__txt a { color: var(--ho-voltage); text-decoration: underline; }
.ho-consent__opts { margin: 14px 0 4px; display: grid; gap: 10px; }
.ho-consent__opts[hidden] { display: none; }
.ho-consent__opt { display: flex; gap: 10px; align-items: flex-start; font: 400 12.5px/1.5 var(--ho-font-mono); color: var(--ho-body); }
.ho-consent__opt input { margin-top: 2px; accent-color: var(--ho-voltage); }
.ho-consent__opt b { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.ho-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ho-consent__actions .ho-btn { font-size: 12px; }
.ho-consent__link { background: none; border: 0; padding: 0; font: 500 11px/1 var(--ho-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ho-label); cursor: pointer; text-decoration: underline; }
.ho-consent__link:hover { color: var(--ho-ink); }
@media (max-width: 520px) { .ho-consent { bottom: 0; width: 100vw; border-left: 0; border-right: 0; border-bottom: 0; } }
/* La barre d'action fixe du bas (mobile/tablette, <= 1024px) occupe le bas de l'ecran :
   le bandeau de consentement doit rester AU-DESSUS d'elle, sinon il masque le burger et
   le CTA appel decouverte (bandeau affiche des la 1re visite). */
@media (max-width: 1024px) {
  .ho-consent { bottom: calc(var(--ho-btmbar-h, 69px) + env(safe-area-inset-bottom) + 12px); }
}

/* --- Pour qui / pas pour qui --- */
.ho-forwhom { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ho-gap); }
@media (max-width: 780px) { .ho-forwhom { grid-template-columns: 1fr; } }
.ho-forwhom__col { border: 1px solid var(--ho-rule-major); padding: 26px; }
.ho-forwhom__col--yes { background: var(--ho-paper-shade); }
.ho-forwhom__col--no { background: transparent; }

/* --- Prix repere --- */
.ho-price { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ho-gap); margin-top: 18px; }
@media (max-width: 620px) { .ho-price { grid-template-columns: 1fr; } }
.ho-price__cell { border: 1px solid var(--ho-rule-major); padding: 22px 24px; }
.ho-price__cell--fill { background: var(--ho-voltage); color: var(--ho-on-voltage); }
.ho-price__lbl {
  display: block;
  font-family: var(--ho-font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .8;
}
.ho-price__val { display: block; font-family: var(--ho-font-display); font-size: 30px; font-weight: 800; margin-top: 8px; }

/* --- FAQ (details/summary) --- */
.ho-faq { margin-top: 20px; border-top: 1px solid var(--ho-rule-minor); }
.ho-faq__item { border-bottom: 1px solid var(--ho-rule-minor); }
.ho-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-family: var(--ho-font-display);
  font-weight: 700;
  font-size: 19px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.ho-faq__item summary::-webkit-details-marker { display: none; }
.ho-faq__item summary::after { content: "+"; color: var(--ho-voltage); font-family: var(--ho-font-mono); }
.ho-faq__item[open] summary::after { content: "\2212"; }
.ho-faq__a { padding: 0 0 20px; color: var(--ho-text-2); font-size: var(--ho-fs-body); line-height: 1.6; }

/* --- Tableau tarifs --- */
.ho-tablewrap { overflow-x: auto; margin-top: 20px; }
.ho-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ho-table th, .ho-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--ho-rule-minor); }
.ho-table th { font-family: var(--ho-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ho-label); }
.ho-table tr:last-child td { border-bottom: 0; }

/* --- Bloc Non Profit --- */
.ho-np { border: 2px solid var(--ho-voltage); padding: 32px; }
.ho-np--teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.ho-np--teaser h2 { margin: 0 0 8px; }
.ho-np .ho-btn { margin-top: 18px; }

/* --- Carte entierement cliquable --- */
a.ho-card,
.ho-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.ho-card--link .ho-link { transition: color var(--ho-dur-2) var(--ho-ease); }
.ho-card--link:hover .ho-link,
.ho-card--link:focus-visible .ho-link { color: var(--ho-voltage); }
.ho-card--link:focus-visible { outline: 2px solid var(--ho-voltage); outline-offset: 2px; }

/* --- Calendrier (iframe) : fond blanc pour fondre les boutons de creneaux --- */
.ho-cal { background: #fff; border: 1px solid var(--ho-rule-major); }
.ho-cal iframe { width: 100%; min-height: 620px; border: 0; display: block; background: #fff; }

/* --- Hover FX (cartes + blocs data-hoverfx) --- */
[data-hoverfx] { transition: transform var(--ho-dur-3) var(--ho-ease), box-shadow var(--ho-dur-3) var(--ho-ease); will-change: transform; }
[data-hoverfx].is-hover { transform: translateY(-6px); box-shadow: 10px 10px 0 var(--ho-voltage); }
[data-hoverfx] .ho-card__well { overflow: hidden; }
[data-hoverfx] .ho-card__well canvas { transition: transform var(--ho-dur-3) var(--ho-ease); }
[data-hoverfx].is-hover .ho-card__well canvas { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  [data-hoverfx], [data-hoverfx] .ho-card__well canvas { transition: none; }
  [data-hoverfx].is-hover { transform: none; box-shadow: 4px 4px 0 var(--ho-voltage); }
  [data-hoverfx].is-hover .ho-card__well canvas { transform: none; }
}

/* ============================================================
   TRANSITIONS DE PAGE (DA Papier)
   Intro (1er chargement de session) : spirale datamosh pleine. Navigation interne :
   fondu datamosh court (bandes horizontales papier + eclats voltage). Le visuel est
   peint par transition.js sur .ho-tr-canvas ; le CSS ne gere que le cache d'attente.
   Arme en navigation interne (drapeau) OU au 1er chargement (intro), et seulement si
   le mouvement est accepte. Contenu jamais masque => SEO OK.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* Canvas plein ecran peint par transition.js (iris + anneau pixel) */
  .ho-tr-canvas {
    position: fixed; inset: 0; z-index: 2100; display: block;
    width: 100vw; height: 100vh; pointer-events: none; background: transparent;
  }
  .ho-tr-canvas.is-on { pointer-events: auto; }

  /* Cache d'attente (papier clair, DA) avant que le canvas prenne le relais.
     Filet de securite : se resorbe seul (1.8s) si le JS ne demarre pas. */
  html.ho-entering::before {
    content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none;
    background: var(--ho-paper);
    animation: ho-tr-failsafe 0s linear 1.8s forwards;
  }
  html.ho-entering.ho-canvas-up::before { opacity: 0; }
  @keyframes ho-tr-failsafe { to { opacity: 0; visibility: hidden; } }
}
