/* ==========================================================================
   Histar — page d'accueil (thème HTML5UP Spectral)
   Fichier : squelettes/css/histar-accueil.css
   Chargé par chaque modèle <histar_...|>. Tout est préfixé .histar pour ne
   pas toucher au reste du thème.
   ========================================================================== */

.histar {
  --h-nuit: #13213D;
  --h-nuit-2: #22365F;
  --h-bleu: #1E3FA8;
  --h-bleu-pale: #EEF2FB;
  --h-encre: #16203A;
  --h-texte: #3E4A63;
  --h-gris: #5A6378;
  --h-trait: #C9D3EA;
  --h-ligne: #DDE3EF;
  --h-orange: #E07A1F;      /* puces et détails */
  --h-cta: #ed355a;         /* bouton « Demander une démo » */
  --h-cta-survol: #d4244a;
  --h-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --h-texte-police: inherit;
  box-sizing: border-box;
  text-align: left;
  letter-spacing: normal;
  line-height: 1.55;
  color: var(--h-encre);
}
.histar *, .histar *::before, .histar *::after { box-sizing: border-box; }

/* Neutralise les styles Spectral sur nos titres, liens et listes */
.histar h2, .histar h3, .histar strong {
  text-transform: none;
  letter-spacing: normal;
}
.histar h2, .histar h3 {
  font-family: var(--h-titre);
  font-weight: 600;
  line-height: 1.15;
  color: var(--h-nuit);
  margin: 0;
  text-wrap: balance;
}
.histar h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.histar h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.histar p { margin: 0; }
.histar a { border-bottom: 0; text-decoration: none; }
.histar img { max-width: 100%; display: block; }

/* Section pleine largeur, même à l'intérieur d'une zone étroite du thème */
.histar-section {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 4.5rem max(1.25rem, calc(50vw - 600px));
  background: #fff;
}
.histar-section--pale { background: var(--h-bleu-pale); }
.histar-pile { display: flex; flex-direction: column; gap: 2rem; }
.histar-entete { display: flex; flex-direction: column; gap: .75rem; max-width: 46rem; }
.histar-surtitre {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #9A4A0C;
}
.histar-surtitre--bleu { color: var(--h-bleu); }
.histar-lead { font-size: 1.05rem; color: var(--h-texte); }

/* Boutons */
.histar .histar-bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 1.4rem; border-radius: 23px; border: 0;
  font-weight: 600; font-size: 1rem; line-height: 1.2; letter-spacing: normal;
  text-transform: none; box-shadow: none; cursor: pointer; white-space: normal;
  height: auto;
}
.histar .histar-bouton--cta { background: var(--h-cta); color: #fff; }
.histar .histar-bouton--cta:hover, .histar .histar-bouton--cta:focus-visible { background: var(--h-cta-survol); color: #fff; }
.histar .histar-bouton--blanc { background: #fff; color: var(--h-nuit); }
.histar .histar-bouton--nuit { background: var(--h-nuit); color: #fff; }
.histar .histar-bouton:focus-visible { outline: 3px solid var(--h-bleu); outline-offset: 2px; }

/* ---------- Héros : 2 entrées + mockup ---------- */
.histar-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3rem;
  max-width: 1200px; margin: 0 auto; padding: 1rem 0 2rem;
  color: #fff;
}
.histar-hero__texte { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.histar-hero__intro { font-size: 1.15rem; color: #DCE3F4; max-width: 36rem; }
.histar-entrees { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.histar-entree {
  display: flex; flex-direction: column; gap: .6rem; padding: 1.5rem; border-radius: 14px;
  background: #fff; color: var(--h-nuit);
}
.histar-entree--sombre { background: var(--h-nuit-2); border: 1px solid #5D72A8; color: #fff; }
.histar-entree__public { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--h-gris); }
.histar-entree--sombre .histar-entree__public { color: #B9C6E6; }
.histar-entree__titre { font-family: var(--h-titre); font-size: 1.6rem; font-weight: 600; line-height: 1.15; color: inherit; }
.histar-entree__texte { font-size: .95rem; color: var(--h-texte); }
.histar-entree--sombre .histar-entree__texte { color: #DCE3F4; }
.histar-entree .histar-bouton { align-self: flex-start; margin-top: .4rem; }

.histar-mockup { flex: 1 1 240px; display: flex; justify-content: center; }
.histar-telephone {
  width: 236px; height: 484px; padding: 9px; border-radius: 44px;
  background: #0A0E18; border: 1px solid #5D72A8; box-shadow: 0 24px 48px rgba(0,0,0,.4);
}
.histar-ecran { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--h-nuit-2); }
.histar-ecran > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.histar-ecran__encoche { position: absolute; top: 10px; left: 50%; width: 72px; height: 20px; margin-left: -36px; border-radius: 10px; background: #0A0E18; }
.histar-ecran .histar-ecran__logo { position: absolute; top: 38px; right: 14px; width: 20px; height: 28px; object-fit: contain; opacity: .9; inset: auto 14px auto auto; }
.histar-ecran__lieu {
  position: absolute; top: 40px; left: 14px; display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 12px; background: rgba(10,14,24,.6);
  font-size: 12px; font-weight: 600; color: #fff; line-height: 1.3;
}
.histar-ecran__carte {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px;
  padding: 14px; border-radius: 18px; background: rgba(255,255,255,.95); color: var(--h-nuit); line-height: 1.3;
}
.histar-ecran__carte strong { font-family: var(--h-titre); font-size: 17px; }
.histar-ecran__carte small { font-size: 12px; color: var(--h-gris); }
.histar-ecran__lecteur { display: flex; align-items: center; gap: 8px; }
.histar-ecran__play { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--h-orange); display: flex; align-items: center; justify-content: center; }
.histar-ecran__barre { flex: 1; height: 4px; border-radius: 2px; background: var(--h-ligne); overflow: hidden; }
.histar-ecran__barre span { display: block; width: 38%; height: 100%; background: var(--h-nuit); }
.histar-ecran__question { align-self: flex-start; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--h-trait); font-size: 12px; font-weight: 600; color: var(--h-bleu); }
.histar-point { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--h-orange); display: inline-block; }

/* ---------- Comment ça marche ---------- */
.histar-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.histar-carte { display: flex; flex-direction: column; gap: .6rem; padding: 1.75rem; border-radius: 14px; background: var(--h-bleu-pale); }
.histar-section--pale .histar-carte { background: #fff; }
.histar-carte__tete { display: flex; align-items: center; justify-content: space-between; }
.histar-carte__num { font-family: var(--h-titre); font-size: 2rem; font-weight: 600; color: var(--h-bleu); line-height: 1; }
.histar-carte__titre { font-size: 1.1rem; font-weight: 700; color: var(--h-nuit); }
.histar-carte__texte { font-size: .95rem; color: var(--h-texte); }

/* ---------- Territoires ---------- */
.histar-colonnes { display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: flex-start; }
.histar-colonnes__large { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.histar-colonnes__etroite { flex: 1 1 320px; min-width: 0; }
.histar-puces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.histar-puces li { display: flex; gap: .9rem; align-items: baseline; margin: 0; padding: 0; color: var(--h-texte); }
.histar-puces li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--h-orange); transform: translateY(-1px); }
.histar-puces strong { color: var(--h-nuit); }
.histar-references { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--h-ligne); }
.histar-references__liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.histar-references__liste strong { display: block; color: var(--h-nuit); }
.histar-references__liste span { font-size: .9rem; color: var(--h-gris); }
.histar-encadre {
  display: flex; flex-direction: column; gap: .9rem; padding: 1.75rem;
  border: 2px solid var(--h-orange); border-radius: 16px; background: #fff;
}
.histar-encadre__titre { font-family: var(--h-titre); font-size: 1.7rem; font-weight: 600; line-height: 1.15; color: var(--h-nuit); }
.histar-encadre ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; color: var(--h-texte); }
.histar-encadre__pied { padding-top: .75rem; border-top: 1px solid #F0D3B6; color: var(--h-nuit); }

/* ---------- Formulaires SPIP dans nos blocs ---------- */
.histar-bloc-form { display: flex; flex-direction: column; gap: 1.25rem; padding: 2rem; border-radius: 16px; background: var(--h-bleu-pale); }
.histar-section--pale .histar-bloc-form { background: #fff; }
.histar-bloc-form .formulaire_spip { margin: 0; padding: 0; background: transparent; border: 0; }
.histar-bloc-form label { color: var(--h-nuit); }
.histar-bloc-form input[type="submit"], .histar-bloc-form button[type="submit"] {
  background: var(--h-cta); color: #fff; border: 0; border-radius: 23px; box-shadow: none;
  min-height: 46px; height: auto; padding: 0 1.6rem; text-transform: none; letter-spacing: normal; font-weight: 600;
}
.histar-bloc-form--participer input[type="submit"], .histar-bloc-form--participer button[type="submit"] { background: var(--h-nuit); }
.histar-note { font-size: .9rem; color: var(--h-gris); }
.histar-note a { color: var(--h-bleu); text-decoration: underline; }

/* ---------- Participer ---------- */
.histar-aside {
  display: flex; flex-direction: column; gap: .9rem; padding: 1.75rem; border-radius: 16px;
  background: var(--h-nuit); color: #fff;
}
.histar-aside .histar-surtitre { color: #B9C6E6; }
.histar-aside .histar-puces li { color: #fff; }
.histar-aside .histar-puces strong { color: #fff; }
.histar-auteurs { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; padding: 2.5rem; border-radius: 20px; background: #fff; }
.histar-auteurs > div { min-width: 0; display: flex; flex-direction: column; gap: .8rem; }
.histar-auteurs > div:first-child { flex: 999 1 440px; }
.histar-auteurs > div:last-child { flex: 1 1 300px; }

@media (max-width: 600px) {
  .histar-section { padding-top: 3rem; padding-bottom: 3rem; }
  .histar-bloc-form, .histar-auteurs, .histar-encadre, .histar-aside { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .histar * { transition: none !important; } }
