/* =====================================================================
   Holding Geocible – feuille de style du template Cassiopeia (Joomla 6)
   À déposer sur le serveur dans :
   media/templates/site/cassiopeia/css/user.css
   Joomla charge ce fichier automatiquement et ne l'écrase pas lors des
   mises à jour.
   Couleurs : rouge et gris du logo, noir pour le texte et le pied de page.
   Police : police système en graisse fine (300) pour les titres.
   ===================================================================== */

:root {
  --hg-rouge: #D0003E;
  --hg-rouge-fonce: #8F042B;
  --hg-noir: #1A1A1A;
  --hg-gris: #5D5D5F;
  --hg-gris-clair: #E6E6E6;
  --hg-fond: #FFFFFF;
  --hg-police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Variables de Cassiopeia */
  --cassiopeia-color-primary: var(--hg-noir);
  --cassiopeia-color-link: var(--hg-rouge);
  --cassiopeia-color-hover: var(--hg-rouge-fonce);
  --cassiopeia-font-family-body: var(--hg-police);
  --cassiopeia-font-family-headings: var(--hg-police);
  --cassiopeia-font-weight-headings: 300;
  --cassiopeia-font-weight-normal: 400;
}

/* ---------- Base ---------- */
body.site {
  background: var(--hg-fond);
  color: var(--hg-noir);
  font-family: var(--hg-police);
  font-size: 1.0625rem;
  line-height: 1.6;
}
body.site h1, body.site h2, body.site h3, body.site h4 {
  font-family: var(--hg-police);
  font-weight: 300;
  color: var(--hg-noir);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
body.site h1 { font-size: clamp(2rem, 4vw, 3rem); }
body.site h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.5rem; }
body.site h3 { font-size: 1.3rem; font-weight: 400; }
body.site a { color: var(--hg-rouge); }
body.site a:hover { color: var(--hg-rouge-fonce); }
body.site a:focus-visible { outline: 2px solid var(--hg-rouge); outline-offset: 2px; }

/* ---------- En-tête : fond blanc, filet rouge ---------- */
body.site .container-header {
  background: var(--hg-fond);
  background-image: none;
  color: var(--hg-noir);
  border-bottom: 3px solid var(--hg-rouge);
  box-shadow: none;
}
body.site .container-header .navbar-brand,
body.site .container-header .brand-logo,
body.site .container-header .site-description {
  color: var(--hg-noir);
}
body.site .container-header .brand-logo img { max-height: 64px; width: auto; }
body.site .container-header .navbar-brand a,
body.site .container-header a.brand-logo {
  color: var(--hg-noir);
  text-decoration: none;
  font-weight: 300;
}
body.site .container-header .site-description { color: var(--hg-gris); font-weight: 300; }

/* Menu principal */
body.site .container-header .mod-menu > li > a,
body.site .container-header .mod-menu > li > span,
body.site .container-header .metismenu > li > a,
body.site .container-header .metismenu > li > button {
  color: var(--hg-noir);
  font-weight: 400;
  text-decoration: none;
}
body.site .container-header .mod-menu > li > a:hover,
body.site .container-header .metismenu > li > a:hover,
body.site .container-header .mod-menu > li.active > a,
body.site .container-header .metismenu > li.active > a,
body.site .container-header .mod-menu > li.current > a,
body.site .container-header .metismenu > li.current > a {
  color: var(--hg-rouge);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--hg-rouge);
}
body.site .container-header .navbar-toggler {
  color: var(--hg-noir);
  border-color: var(--hg-gris-clair);
}

/* ---------- Alignement : en-tête, contenu et pied sur la même largeur ---------- */
body.site .container-header .grid-child,
body.site .container-footer .grid-child {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 74rem) {
  body.site .container-header .grid-child,
  body.site .container-footer .grid-child { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Contenu ---------- */
body.site .container-component { max-width: 72rem; }
body.site .page-header { border: 0; margin-bottom: 1rem; }
body.site .com-content-article__body p,
body.site .com-content-article__body li { max-width: 68ch; }

/* Liste des articles de la catégorie Démos */
body.site .blog-item {
  border-top: 1px solid var(--hg-gris-clair);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Boutons */
body.site .btn-primary,
body.site a.hg-bouton,
body.site button.hg-bouton {
  display: inline-block;
  background: var(--hg-rouge);
  border-color: var(--hg-rouge);
  color: #fff;
  padding: .75rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 500;
}
body.site .btn-primary:hover,
body.site a.hg-bouton:hover,
body.site button.hg-bouton:hover {
  background: var(--hg-rouge-fonce);
  border-color: var(--hg-rouge-fonce);
  color: #fff;
}

/* ---------- Pied de page noir ---------- */
body.site .container-footer {
  background: var(--hg-noir);
  background-image: none;
  color: #CFCFCF;
  font-size: .9rem;
}
body.site .container-footer a { color: #FFFFFF; }
body.site .container-footer a:hover { color: #F3A9BD; }
body.site .container-footer .mod-menu { flex-direction: row; gap: 1.5rem; }

/* =====================================================================
   Blocs à utiliser dans les articles (classes « hg- »)
   ===================================================================== */

/* Accroche de la page d'accueil */
.hg-accroche { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; margin: 1rem 0 3rem; }
.hg-accroche .hg-titre { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 300; line-height: 1.08; margin: 0 0 1rem; }
.hg-accroche .hg-chapeau { font-size: 1.2rem; color: var(--hg-gris); font-weight: 300; max-width: 34ch; margin: 0 0 1.75rem; }

/* Démo intégrée (carte ou mini-application dans une iframe) */
.hg-demo { position: relative; width: 100%; aspect-ratio: 5 / 3; border: 1px solid var(--hg-gris-clair); background: #fff; margin: 0 0 .5rem; }
.hg-demo.hg-haute { aspect-ratio: auto; height: min(80vh, 720px); min-height: 480px; }

/* Devise */
.hg-devise { color: var(--hg-rouge); font-size: 1.05rem; letter-spacing: .02em; margin: 0 0 .75rem; }
.hg-demo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hg-legende { font-size: .875rem; color: var(--hg-gris); margin: 0 0 2rem; }

/* Colonnes (prestations, références) */
.hg-colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin: 1.5rem 0 2.5rem; }
.hg-colonnes h3 { margin-top: 0; padding-top: .9rem; border-top: 2px solid var(--hg-rouge); }
.hg-colonnes ul { padding-left: 1.1rem; color: var(--hg-gris); }

/* Sources open data */
.hg-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem 2.5rem; margin: 1.5rem 0 2.5rem; }
.hg-sources dt { font-weight: 600; }
.hg-sources dd { margin: .2rem 0 0; color: var(--hg-gris); }

/* Étapes numérotées (démarche) */
ol.hg-etapes { list-style: none; counter-reset: etape; padding: 0; margin: 1.5rem 0 2.5rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
ol.hg-etapes li { counter-increment: etape; }
ol.hg-etapes li::before { content: counter(etape); display: block; font-size: 2.6rem; font-weight: 200; line-height: 1; color: var(--hg-rouge); margin-bottom: .5rem; }
ol.hg-etapes strong { display: block; margin-bottom: .25rem; }
ol.hg-etapes span { color: var(--hg-gris); }

/* Frise chronologique (parcours) */
ol.hg-frise { list-style: none; margin: 1.5rem 0 2.5rem; padding: 0; border-left: 2px solid var(--hg-gris-clair); }
ol.hg-frise li { position: relative; padding: 0 0 1.75rem 1.5rem; }
ol.hg-frise li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--hg-rouge); }
ol.hg-frise li:first-child::before { background: var(--hg-gris); }
ol.hg-frise .hg-periode { display: block; font-size: .9rem; color: var(--hg-gris); }
ol.hg-frise strong { display: block; font-size: 1.1rem; font-weight: 500; }
ol.hg-frise p { margin: .25rem 0 0; color: var(--hg-gris); }

/* Deux colonnes : texte + encadré (parcours, contact) */
.hg-deux { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3rem; }

/* Encadré discret */
.hg-encadre { border-left: 3px solid var(--hg-rouge); padding: .25rem 0 .25rem 1.25rem; margin: 1.5rem 0; }
.hg-encadre p { margin: 0; }

/* Coordonnées */
.hg-coordonnees { font-size: 1.35rem; font-weight: 300; line-height: 1.5; }

/* ---------- Mobile ---------- */
@media (max-width: 60rem) {
  .hg-accroche, .hg-deux { grid-template-columns: 1fr; gap: 1.5rem; }
  .hg-colonnes { grid-template-columns: 1fr; gap: 1.5rem; }
  ol.hg-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  ol.hg-etapes { grid-template-columns: 1fr; }
  .hg-demo { aspect-ratio: 3 / 4; }
  .hg-demo.hg-haute { height: 92vh; min-height: 640px; }
}

/* =====================================================================
   Parcours client (décembre 2026)
   ===================================================================== */

/* Bouton secondaire (contour) */
body.site a.hg-bouton.hg-secondaire { background: transparent; color: var(--hg-rouge); border: 1px solid var(--hg-rouge); }
body.site a.hg-bouton.hg-secondaire:hover { background: var(--hg-rouge); color: #fff; }
.hg-boutons { display: flex; flex-wrap: wrap; gap: .75rem; }
body.site button.hg-bouton { border: 1px solid var(--hg-rouge); cursor: pointer; font: inherit; font-weight: 500; }

/* Champ « Essayez avec votre commune » */
.hg-commune { margin: .25rem 0 2rem; }
.hg-commune label { display: block; font-weight: 500; margin-bottom: .4rem; }
.hg-commune .hg-ligne { display: flex; flex-wrap: wrap; gap: .5rem; }
.hg-commune input { flex: 1 1 14rem; min-width: 0; padding: .7rem .85rem; border: 1px solid #BDBDBD; border-radius: 3px; font: inherit; }
.hg-commune input:focus { outline: 2px solid var(--hg-rouge); outline-offset: 1px; border-color: var(--hg-rouge); }

/* Cartes « Vous êtes… » */
.hg-profils { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2.5rem; }
body.site .hg-profils a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--hg-gris-clair); border-top: 3px solid var(--hg-rouge);
  padding: 1.1rem 1.2rem; text-decoration: none; color: var(--hg-noir); }
body.site .hg-profils a:hover { border-color: var(--hg-rouge); }
.hg-profils strong { font-size: 1.15rem; font-weight: 500; margin-bottom: .4rem; }
.hg-profils span { color: var(--hg-gris); font-size: .95rem; flex: 1; }
.hg-profils a::after { content: "→"; color: var(--hg-rouge); margin-top: .6rem; font-size: 1.2rem; }

/* Questions des visiteurs (pages « Pour qui ») */
ul.hg-questions { list-style: none; padding: 0; margin: 1rem 0 2.5rem; }
body.site ul.hg-questions li { border-top: 1px solid var(--hg-gris-clair); padding: .75rem 0; max-width: none; }
body.site ul.hg-questions a { text-decoration: none; }
ul.hg-questions em { display: block; color: var(--hg-noir); }
ul.hg-questions span { font-size: .9rem; color: var(--hg-rouge); }

/* Fin de démo : pour aller plus loin, démos voisines */
.hg-fin { background: #F6F6F6; border-left: 3px solid var(--hg-rouge); padding: 1.25rem 1.5rem; margin: 2.5rem 0 1.5rem; }
body.site .hg-fin h2 { margin-top: 0; font-size: 1.5rem; }
.hg-fin p { margin: 0 0 1rem; }
.hg-fin p:last-child { margin-bottom: 0; }
ul.hg-voisines { list-style: none; padding: 0; margin: .75rem 0 2rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; }
ul.hg-voisines a::before { content: "→ "; }

/* Fil d'Ariane */
body.site .mod-breadcrumbs, body.site .breadcrumb { background: none; padding: 0; margin: 0 0 1rem; font-size: .875rem; color: var(--hg-gris); }
body.site .mod-breadcrumbs { padding-left: 0 !important; padding-right: 0 !important; }
body.site .mod-breadcrumbs a { color: var(--hg-gris); }
body.site .mod-breadcrumbs a:hover { color: var(--hg-rouge); }

@media (max-width: 60rem) {
  .hg-profils { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .hg-profils { grid-template-columns: 1fr; }
}

/* Page Contact : le message d'accueil (délai de réponse) passe avant les coordonnées et le formulaire */
body.site .com-contact { display: flex; flex-direction: column; }
body.site .com-contact > * { order: 2; }
body.site .com-contact > h1 { order: 0; }
body.site .com-contact > .com-contact__miscinfo { order: 1; font-size: 1.15rem; font-weight: 300; margin-bottom: 1.5rem; }
body.site .com-contact > h3:has(+ .com-contact__miscinfo),
body.site .com-contact__miscinfo dt { display: none; }
body.site .com-contact__miscinfo dl, body.site .com-contact__miscinfo dd { margin: 0; }

/* =====================================================================
   Refonte « Vos questions » (décembre 2026)
   ===================================================================== */

/* Chapeau en tête d'une page */
body.site .com-content-article__body > .hg-chapeau,
body.site .category-desc > .hg-chapeau { font-size: 1.2rem; color: var(--hg-gris); font-weight: 300; max-width: 60ch; }

/* Bulles des questions (accueil, page Vos questions) */
.hg-bulles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 1.25rem; }
body.site .hg-bulles a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--hg-gris-clair); border-radius: 1.25rem;
  padding: 1rem 1.25rem; text-decoration: none; color: var(--hg-noir); transition: border-color .15s, background .15s; }
body.site .hg-bulles a:hover { border-color: var(--hg-rouge); background: #FFF5F8; }
.hg-bulles strong { font-size: 1.15rem; font-weight: 400; line-height: 1.25; margin-bottom: .35rem; }
.hg-bulles span { color: var(--hg-gris); font-size: .9rem; flex: 1; }
.hg-bulles a::after { content: "→"; color: var(--hg-rouge); margin-top: .4rem; }

/* Accès à part : « J'ai des données… » */
body.site p.hg-donnees { max-width: none; margin: 0 0 2.5rem; }
body.site p.hg-donnees a { display: block; background: var(--hg-noir); color: #fff; border-radius: 1.25rem; padding: 1rem 1.25rem; text-decoration: none; }
body.site p.hg-donnees a:hover { background: var(--hg-rouge-fonce); color: #fff; }
body.site p.hg-donnees strong { font-weight: 500; margin-right: .35rem; }

/* Galerie de démos (cartes avec image facultative) */
.hg-galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0 1.5rem; }
body.site .hg-galerie > a, body.site .hg-galerie a.hg-carte-titre { display: flex; flex-direction: column; border: 1px solid var(--hg-gris-clair); border-top: 3px solid var(--hg-rouge);
  text-decoration: none; color: var(--hg-noir); padding: 0 0 1rem; height: 100%; }
body.site .hg-galerie > div { display: flex; flex-direction: column; }
body.site .hg-galerie > div > a.hg-carte-titre { height: auto; flex: 1; }
body.site .hg-galerie a:hover { border-color: var(--hg-rouge); }
.hg-galerie img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--hg-gris-clair); margin-bottom: .75rem; }
.hg-galerie strong { display: block; font-size: 1.1rem; font-weight: 500; line-height: 1.25; padding: .9rem 1.1rem .3rem; }
.hg-galerie img + strong { padding-top: 0; }
.hg-galerie span { display: block; color: var(--hg-gris); font-size: .9rem; padding: 0 1.1rem; }
body.site p.hg-familles { font-size: .8rem; color: var(--hg-gris); margin: .4rem 0 0; }
body.site p.hg-familles a { color: var(--hg-gris); }
body.site p.hg-familles a:hover { color: var(--hg-rouge); }

/* Quatre colonnes (ce que vous recevez) ; deux colonnes égales (exemples) */
.hg-colonnes.hg-quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem; }
.hg-deux-egal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.hg-deux-egal .hg-encadre { margin: .5rem 0; }

/* Question sans démo */
ul.hg-questions span.hg-sans-demo { color: var(--hg-gris); }

@media (max-width: 60rem) {
  .hg-bulles, .hg-galerie, .hg-colonnes.hg-quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hg-deux-egal { grid-template-columns: 1fr; }
}
@media (max-width: 34rem) {
  .hg-bulles, .hg-galerie, .hg-colonnes.hg-quatre { grid-template-columns: 1fr; }
}

/* Accueil : invitation sous le chapeau et lien vers les questions (2 décembre 2026, soir) */
.hg-accroche .hg-chapeau { max-width: 40ch; margin-bottom: 1rem; }
.hg-accroche .hg-invite { color: var(--hg-noir); max-width: 40ch; margin: 0 0 1.5rem; }
body.site a.hg-lien-bas { align-self: center; text-decoration: none; }
body.site a.hg-lien-bas:hover { text-decoration: underline; }
#questions { scroll-margin-top: 1rem; }

/* Pages de questions sans démo pour l'instant */
body.site p.hg-bientot { max-width: none; background: #F6F6F6; border-left: 3px solid var(--hg-rouge); padding: 1rem 1.25rem; margin: 1.5rem 0 2rem; }
