/* ==========================================================================
   Page d'accueil publique (views/informations.ejs)
   --------------------------------------------------------------------------
   Fichier séparé de main.css volontairement : c'est la page dont le style
   bouge le plus souvent. L'isoler évite de fouiller mille lignes à chaque
   retouche, et main.css n'est pas rechargé pour rien.

   Tout est construit sur les variables de palette définies en tête de
   main.css : changer --blue ou --gradient-cta se répercute ici sans toucher
   une seule règle de ce fichier.
   ========================================================================== */

/* --- Bandeau d'annonce, tout en haut -------------------------------------- */
.home-annonce {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 9px 18px; margin-bottom: 18px;
  border-radius: 999px; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.88rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.home-annonce:hover { border-color: var(--border-active); transform: translateY(-1px); }
.home-annonce-pastille {
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--gradient-cta); color: #04121f;
}
.home-annonce-texte { color: var(--text); }
.home-annonce-fleche { color: var(--cyan); }

.home-lien-nav { color: var(--text-muted); }
.home-lien-nav:hover { color: var(--text); }

/* --- Hero ----------------------------------------------------------------- */
.home-hero { text-align: center; }
.home-hero-etiquette {
  display: inline-block; margin-bottom: 18px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(0, 140, 255, 0.1); border: 1px solid rgba(0, 194, 255, 0.28);
  color: var(--cyan); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em;
}
.home-hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px;
}

/* --- En-tête de section, commun à toutes ---------------------------------- */
.home-titre-section { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.home-surtitre {
  display: block; margin-bottom: 10px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--gradient-premium);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-titre-section h2 {
  margin: 0 0 10px; font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2;
}
.home-titre-section p { margin: 0; color: var(--text-muted); line-height: 1.6; }

/* --- Piliers de fonctionnalités ------------------------------------------- */
.home-piliers {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.home-pilier {
  padding: 22px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.home-pilier:hover {
  border-color: var(--border-active); background: var(--bg-card-hover); transform: translateY(-3px);
}
.home-pilier-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 14px; border-radius: 12px;
  background: rgba(0, 140, 255, 0.12); color: var(--cyan);
}
.home-pilier-titre { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 7px; }
.home-pilier-texte { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* --- Offres --------------------------------------------------------------- */
.home-offres {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.home-offre {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 26px 22px; border-radius: var(--radius); text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.home-offre:hover { border-color: var(--border-active); transform: translateY(-3px); }
.home-offre.is-mise-en-avant { border-color: var(--border-active); background: var(--bg-card-hover); }
.home-offre-pastille {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--gradient-premium); color: #04121f;
}
.home-offre-nom {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}
.home-offre-prix { font-family: var(--font-heading); font-size: 2rem; line-height: 1.1; }
.home-offre-note { color: var(--text-dim); font-size: 0.82rem; }
.home-offre-desc {
  flex: 1; margin: 10px 0 16px;
  color: var(--text-muted); font-size: 0.88rem; line-height: 1.55;
}

/* --- Étapes --------------------------------------------------------------- */
.home-etapes {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.home-etape {
  padding: 24px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.home-etape-numero {
  display: block; margin-bottom: 12px;
  font-family: var(--font-heading); font-size: 1.9rem; line-height: 1;
  background: var(--gradient-premium);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-etape-titre { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 7px; }
.home-etape-texte { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* --- FAQ ------------------------------------------------------------------
   <details> natif : dépliable au clavier, fonctionne sans JavaScript, et
   reste lisible si le CSS ne charge pas. Aucun script à maintenir. */
.home-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.home-faq-item {
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease);
}
.home-faq-item[open] { border-color: var(--border-active); }
.home-faq-item summary {
  padding: 16px 20px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary::after {
  content: "+"; color: var(--cyan); font-size: 1.3rem; line-height: 1;
  transition: transform 0.25s var(--ease);
}
.home-faq-item[open] summary::after { transform: rotate(45deg); }
.home-faq-item p {
  margin: 0; padding: 0 20px 18px;
  color: var(--text-muted); font-size: 0.92rem; line-height: 1.65;
}

/* --- Appel à l'action final ----------------------------------------------- */
.home-cta {
  padding: 46px 28px; border-radius: var(--radius); text-align: center;
  background: var(--bg-card); border: 1px solid var(--border-active);
}
.home-cta h2 {
  margin: 0 0 10px; font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}
.home-cta p { margin: 0 0 22px; color: var(--text-muted); }

/* --- Pied de page en colonnes --------------------------------------------- */
.home-pied-colonnes {
  display: grid; gap: 26px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.home-pied-titre {
  margin-bottom: 12px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
}
.home-pied-colonnes a {
  display: block; margin-bottom: 8px;
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}
.home-pied-colonnes a:hover { color: var(--cyan); }

@media (max-width: 640px) {
  .home-annonce { flex-direction: column; gap: 6px; border-radius: var(--radius-sm); }
  .home-hero-actions .btn { width: 100%; }
}

/* --- Corrections d'assise sur la page d'accueil ---------------------------- */

/* .public-stats plafonne à 780px dans main.css : avec quatre cartes, la
   quatrième passait à la ligne. On élargit UNIQUEMENT sur l'accueil, et on
   réduit la largeur minimale pour que les quatre tiennent côte à côte. */
.public-shell .public-stats {
  max-width: 1080px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Le hero reprend la largeur des sections plutôt que les 780px d'origine :
   un titre sur deux lignes respire mieux. */
.public-shell .home-hero { max-width: 860px; }

/* Le logo est une vraie image : sans object-fit elle se déforme. */
.public-brand-logo { object-fit: contain; }

/* --- En-tête public --------------------------------------------------------
   Calqué sur .topbar-slim du dashboard (même hauteur, même fond translucide,
   même bordure basse) mais sans la marge de barre latérale : le visiteur
   retrouve exactement la même barre une fois connecté. */
.home-entete {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1.5rem;
  height: var(--topbar-height); padding: 0 1.5rem;
  background: rgba(5, 8, 22, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
/* flex: 1 sur les blocs de gauche ET de droite : ils occupent la même
   largeur quel que soit leur contenu, ce qui place la navigation au centre
   EXACT de la barre. Sans ça, le bloc de droite (pastille + langue + bouton)
   étant plus large que le logo, la nav se retrouvait décalée vers la gauche. */
.home-entete-marque {
  flex: 1 1 0; min-width: 0; justify-content: flex-start;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
  color: var(--text); text-decoration: none;
}
.home-entete-marque:hover { color: var(--text); }
.home-entete-marque span { white-space: nowrap; }

/* margin: auto horizontal + flex:1 : les liens se placent au MILIEU de la
   barre au lieu de rester collés au logo. Le bloc de droite garde son
   margin-left:auto, les deux se repoussent donc symétriquement. */
.home-entete-nav {
  flex: 0 1 auto; display: flex; align-items: center; justify-content: center;
  gap: 1.6rem;
}
.home-entete-nav a {
  font-size: 0.86rem; color: var(--text-muted); text-decoration: none;
  transition: color 0.2s var(--ease);
}
.home-entete-nav a:hover { color: var(--text); }

.home-entete-droite {
  flex: 1 1 0; min-width: 0; justify-content: flex-end;
  display: flex; align-items: center; gap: 0.7rem;
}

/* Le bandeau d'annonce passe sous l'en-tête et perd sa pilule flottante :
   collé en pleine largeur, il se lit comme une bande, pas comme un bouton. */
.home-annonce {
  margin-bottom: 0; border-radius: 0;
  border-left: none; border-right: none; border-top: none;
}

@media (max-width: 900px) {
  /* Sous cette largeur la barre déborderait : les ancres disparaissent, les
     sections restent atteignables en faisant défiler la page. */
  .home-entete-nav { display: none; }
}
@media (max-width: 560px) {
  .home-entete { gap: 0.8rem; padding: 0 1rem; }
  .home-entete .status-pill { display: none; }
}
