/* Feuille de style du blog public (views/public/blog.ejs, article.ejs) —
   copie du système visuel de la vitrine statique (landing/*.html, dont le CSS
   est inline dans chaque fichier). La CSP autorise style-src 'self'. */
  /* Même système que /index.html (dégradés violet/cyan/rose/lime sur
     fond blanc) — pages du blog, mêmes classes réutilisées. */
  :root {
    --fond: #ffffff;
    --fond2: #f1ecfb;
    --violet: #8b5cf6;
    --cyan: #22d3ee;
    --rose: #fb7185;
    --lime: #c6ff5e;
    --violet-texte: #6d28d9;
    --cyan-texte: #0e7490;
    --rose-texte: #be123c;
    --succes: #16a34a;
    --texte: #16121f;
    --texte-att: #5b5470;
    --bordure: rgba(22,18,31,0.12);
    --verre: rgba(139,92,246,0.05);
    --verre-bordure: rgba(22,18,31,0.10);
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--fond);
    color: var(--texte);
    line-height: 1.6;
    overflow-x: hidden;
  }
  a { color: inherit; }
  .conteneur { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
  .sym { font-family: 'Material Symbols Outlined'; }
  ::selection { background: var(--violet); color: #fff; }

  .fond-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(circle at 12% 8%, rgba(139,92,246,0.16), transparent 45%),
      radial-gradient(circle at 88% 0%, rgba(34,211,238,0.14), transparent 40%),
      radial-gradient(circle at 60% 100%, rgba(251,113,133,0.10), transparent 50%),
      var(--fond);
  }

  header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
    background: var(--verre);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--verre-bordure);
    border-radius: 0 0 20px 20px;
  }
  header .logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
  header .logo img { height: 38px; width: 38px; }
  header .logo .marque-xylao { color: var(--violet-texte); }
  header nav { display: flex; align-items: center; gap: 1rem; }
  header nav a, header nav .lien-desactive {
    text-decoration: none;
    font-weight: 700;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--violet), var(--cyan));
    color: #08070d;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  header nav a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,92,246,0.45); }
  header nav a.lien-secondaire { background: none; color: var(--texte); padding: 0.6rem 0.5rem; box-shadow: none; }
  header nav a.lien-secondaire:hover { background: none; box-shadow: none; transform: none; text-decoration: underline; }

  .hero { padding: 4rem 1.5rem 3rem; text-align: center; }
  .hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 auto 1.25rem;
    max-width: 780px;
    color: var(--texte);
    line-height: 1.1;
  }
  .hero h1 .accent {
    background: linear-gradient(100deg, var(--violet-texte), var(--rose-texte));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; /* Safari mobile : sans cela le dégradé s'affiche en rectangles pleins */
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  .hero p.sous-titre { font-size: 1.15rem; color: var(--texte-att); max-width: 620px; margin: 0 auto 2rem; }

  .cta-groupe { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .bouton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.02rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
  }
  .bouton:hover { transform: translateY(-3px) scale(1.02); }
  .bouton-primaire { background: linear-gradient(120deg, var(--lime), var(--cyan)); color: #08070d; box-shadow: 0 10px 28px rgba(198,255,94,0.3); }
  .bouton-secondaire { background: var(--verre); backdrop-filter: blur(10px); border: 1px solid var(--verre-bordure); color: var(--texte); }

  .lien-desactive {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.9rem;
    border-radius: 999px;
    font-weight: 700;
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--verre);
    border: 1px dashed var(--bordure);
    color: var(--texte-att) !important;
  }
  .badge-bientot {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--rose);
    color: #08070d;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.4rem;
  }

  section { padding: 4rem 1.5rem; position: relative; }
  section h2 {
    text-align: center;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--texte);
  }
  .soustitre-section { text-align: center; max-width: 600px; margin: -0.5rem auto 3rem; color: var(--texte-att); }

  /* ---------- Cartes espace (réutilise le style "profil-carte" de l'accueil) ---------- */
  .comparatif-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
  }
  .profil-carte {
    background: var(--verre);
    backdrop-filter: blur(10px);
    border: 1px solid var(--verre-bordure);
    border-radius: 22px;
    padding: 1.75rem;
  }
  .profil-carte h3 { margin: 0 0 1rem; color: var(--texte); display: flex; align-items: center; gap: 0.5rem; }
  .profil-carte h3 .sym { font-size: 1.6rem; color: var(--cyan-texte); }
  .profil-carte ul { list-style: none; margin: 0; padding: 0; }
  .profil-carte li { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.5rem 0; font-size: 0.9rem; color: var(--texte); border-bottom: 1px dashed var(--bordure); }
  .profil-carte li:last-child { border-bottom: none; }
  .profil-carte li .sym { font-size: 1.1rem; color: var(--succes); flex-shrink: 0; margin-top: 0.1rem; }
  .profil-carte li span.detail { display: block; font-size: 0.82rem; color: var(--texte-att); font-weight: 400; }
  .profil-carte li strong { font-weight: 700; }

  /* ---------- Fonctionnalités transverses (grille libre, hauteur naturelle) ---------- */
  .grille-transverses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 1140px;
    margin: 0 auto;
  }
  .bento-carte {
    border-radius: 22px;
    padding: 1.5rem;
    background: var(--verre);
    backdrop-filter: blur(10px);
    border: 1px solid var(--verre-bordure);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .bento-carte:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(139,92,246,0.25); }
  .bento-carte .sym { font-size: 2.2rem; color: var(--cyan-texte); margin-bottom: 0.75rem; display: block; }
  .bento-carte h3 { margin: 0 0 0.4rem; font-size: 1.1rem; color: var(--texte); }
  .bento-carte p { margin: 0; font-size: 0.9rem; color: var(--texte); opacity: 0.75; }

  .cta-finale { text-align: center; }
  .cta-finale .conteneur {
    background: linear-gradient(135deg, var(--violet), var(--rose));
    border-radius: 32px;
    padding: 3.5rem 2rem;
    color: #fff;
  }
  .cta-finale h2 { color: #fff; margin-bottom: 1.5rem; }
  .cta-finale .lien-desactive { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: #fff !important; }

  footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    font-size: 0.85rem;
    color: var(--texte-att);
  }
  footer nav { margin-bottom: 0.75rem; }
  footer nav a { text-decoration: none; margin: 0 0.6rem; }
  footer nav a:hover { text-decoration: underline; }

  /* ---------- Ajouts pages du blog ---------- */
  header nav a.lien-secondaire[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--violet); text-decoration-thickness: 2px; }
  header nav { flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
  .etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; max-width: 1000px; margin: 0 auto; counter-reset: e; }
  .etape { counter-increment: e; background: var(--verre); backdrop-filter: blur(10px); border: 1px solid var(--verre-bordure); border-radius: 22px; padding: 1.75rem; }
  .etape::before { content: counter(e); display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--violet-texte); margin-bottom: 0.75rem; }
  .etape h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
  .etape p { margin: 0; font-size: 0.92rem; opacity: 0.8; }
  .bandeau-texte { max-width: 760px; margin: 2rem auto 0; text-align: center; color: var(--texte-att); }
  .prose { max-width: 760px; margin: 0 auto; }
  .prose h2 { text-align: left; font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2.5rem 0 0.75rem; }
  .prose p, .prose li { color: var(--texte); opacity: 0.85; }
  .prose ul { padding-left: 1.2rem; }
  .prose li { margin-bottom: 0.4rem; }
  .prose .encadre { background: var(--verre); border: 1px solid var(--verre-bordure); border-left: 4px solid var(--violet); border-radius: 14px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
  .articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
  .article-carte { background: var(--verre); backdrop-filter: blur(10px); border: 1px solid var(--verre-bordure); border-radius: 22px; padding: 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
  .article-carte:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(139,92,246,0.25); }
  .article-carte .tag { align-self: flex-start; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--violet-texte); }
  .article-carte h3 { margin: 0; font-size: 1.25rem; }
  .article-carte p { margin: 0; font-size: 0.92rem; opacity: 0.75; flex: 1; }
  .article-carte .lire { font-weight: 700; color: var(--violet-texte); }
  .fil { max-width: 760px; margin: 0 auto 1rem; font-size: 0.9rem; }
  .fil a { color: var(--violet-texte); font-weight: 700; text-decoration: none; }
  .titre-article { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0.5rem 0 1.5rem; }
  .article-carte .date-article { font-size: 0.8rem; color: var(--texte-att); }

  /* ---------- Sous-menu « Tarifs » (commun à toutes les pages vitrine) ---------- */
  header nav .menu-deroulant { position: relative; display: inline-flex; align-items: center; }
  header nav .sous-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: 0.5rem; z-index: 50; }
  header nav .menu-deroulant:hover .sous-menu, header nav .menu-deroulant:focus-within .sous-menu { display: block; }
  header nav .sous-menu-liste { display: flex; flex-direction: column; min-width: 220px; padding: 0.4rem; background: var(--fond); border: 1px solid var(--bordure); border-radius: 14px; box-shadow: 0 16px 32px rgba(139,92,246,0.25); }
  header nav .sous-menu a { background: none; color: var(--texte); padding: 0.6rem 0.9rem; border-radius: 10px; box-shadow: none; justify-content: flex-start; white-space: nowrap; }
  header nav .sous-menu a:hover { background: var(--fond2); box-shadow: none; transform: none; text-decoration: none; }
  header nav .sous-menu-sep { display: block; height: 1px; margin: 0.3rem 0.6rem; background: var(--bordure); }
  header nav .sous-menu-groupe { position: relative; display: flex; }
  header nav .sous-menu-groupe > a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  header nav .sous-menu-groupe > a::after { content: '\2039'; font-size: 1.2rem; line-height: 1; }
  header nav .sous-sous-menu { display: none; position: absolute; right: 100%; top: -0.4rem; padding-right: 0.35rem; z-index: 60; }
  header nav .sous-menu-groupe:hover .sous-sous-menu, header nav .sous-menu-groupe:focus-within .sous-sous-menu { display: block; }
