/* ============================================
   STYLES DE PAGES INTERNES (assets/css/pages.css)
   Templates partagés par les pages
   fonctionnalités, solutions, etc.
   Utilise uniquement les variables de styles.css
   ============================================ */

/* --- FIL D'ARIANE --- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: var(--border-dark);
}

.breadcrumb [aria-current="page"] {
    color: var(--text-body);
    font-weight: 600;
}

/* --- HERO DE PAGE --- */
.page-hero {
    text-align: center;
    padding: 60px 0 70px 0;
}

.page-hero-tag {
    background: var(--bg-sub);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-title);
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.page-hero h1 {
    font-size: 54px;
    color: var(--text-title);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    max-width: 850px;
    margin: 0 auto 24px auto;
}

.page-hero h1 em,
.page-hero h1 .serif {
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: var(--text-titre);
}

.page-hero p {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

/* --- SECTIONS --- */
.page-section {
    padding: 60px 0;
}

.page-section.alt {
    background: var(--bg-sub);
    transition: background var(--transition-speed) ease;
}

.section-head {
    text-align: center;
    margin-bottom: 56px;
}

.section-head h2 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-title);
    margin-top: 8px;
}

.section-head h2 em,
.section-head h2 .serif {
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: var(--text-titre);
}

.section-head p {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 16px auto 0 auto;
    line-height: 1.7;
}

/* --- GRILLES DE CARTES --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

/* --- ITEM 6 : une grille de 4 cartes s'affiche 2 par ligne sur 2 lignes
       (au lieu de 3 sur la première ligne et la 4e seule en dessous).
       :has() cible uniquement les grilles comptant exactement 4 enfants ;
       sans prise en charge du sélecteur, la règle est simplement ignorée. --- */
.card-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.steps-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.also-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.gloss-grille:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.pourqui-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.security-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.startup-board-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.demo-agenda-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))),
.devis-promo-grid:has(> :nth-child(4)):not(:has(> :nth-child(5))) {
    grid-template-columns: repeat(2, 1fr);
}

/* --- CARTE À ICÔNE (problème, bénéfice, fonctionnalité) --- */
.icon-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px -20px var(--shadow-hover);
}

.icon-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-sub);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all var(--transition-speed) ease;
}

.icon-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
    transition: stroke var(--transition-speed) ease;
}

.icon-card:hover .icon-card-icon {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05) rotate(-3deg);
}

.icon-card:hover .icon-card-icon svg {
    stroke: #ffffff;
}

.icon-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 10px;
}

.icon-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

/* --- MISE EN PAGE SÉPARÉE (texte + visuel) --- */
/* Item 7 : le visuel reste aligné en haut ("top") et non centré verticalement */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.split-grid.reverse {
    direction: rtl;
}

.split-grid.reverse > * {
    direction: ltr;
}

.split-text h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 16px;
}

.split-text p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

.split-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.split-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.55;
}

/* Coche des listes de points : 15 x 15, comme la liste "Les résultats"
   de l'étude de cas (assets/commun/etude-de-cas.php).
   Sans largeur/hauteur explicite, un SVG muni d'un viewBox prend la taille
   par défaut d'un élément remplacé (552 px ici) : les coches s'affichaient
   en énorme sur les 20 pages qui n'avaient pas width/height dans le balisage. */
.split-list li svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 3px;
    stroke: #1f8a5b;
}

/* --- ÉTAPES (comment ça marche) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px -20px var(--shadow-hover);
}

.step-num {
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 34px;
    color: var(--accent);
    display: block;
    margin-bottom: 14px;
    font-feature-settings: "tnum";
}

.step-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

/* --- ANIMATION SIGNATURE DES PAGES --- */
/* Déclenchée au scroll par IntersectionObserver
   (un fichier js/pages/[page].js par page) */
.fade-stagger {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease,
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- FAQ (accordéon, compatible scripts.js initFaq) --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    cursor: pointer;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    transition: color var(--transition-speed) ease;
}

.faq-item:hover .faq-question {
    color: var(--accent);
}

.faq-question span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--border-dark);
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    transition: all var(--transition-speed) ease;
}

.faq-item.active .faq-question span {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
    margin-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 350px;
    margin-top: 14px;
}

.faq-answer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

/* --- TABLEAU COMPARATIF --- */
.compare-table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 16px 20px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.compare-table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.compare-table td:first-child {
    font-weight: 600;
    color: var(--text-title);
}

.compare-table tbody tr {
    transition: background var(--transition-speed) ease;
}

.compare-table tbody tr:hover {
    background: var(--bg-sub);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table .before {
    color: var(--text-muted);
}

.compare-table .after {
    color: var(--text-body);
    font-weight: 500;
}

@media (max-width: 600px) {
    .compare-table th,
    .compare-table td {
        padding: 12px 14px;
        font-size: 13.5px;
    }
}

/* --- PANNEAU CTA FINAL --- */
.cta-panel {
    background: #0f1a24;
    border-radius: 24px;
    padding: 56px 40px;
    text-align: center;
    box-shadow: 0 20px 60px -20px var(--shadow);
}

.cta-panel-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #7ab7d4;
    background: rgba(122, 183, 212, 0.12);
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(122, 183, 212, 0.15);
    margin-bottom: 20px;
}

.cta-panel h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.cta-panel h2 em,
.cta-panel h2 .serif {
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: #7ab7d4;
}

.cta-panel p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    max-width: 520px;
    margin: 0 auto 32px auto;
}

/* Sans cette règle, un lien dans le paragraphe reprenait le bleu par défaut
   du navigateur (#0000ee) sur le fond sombre du panneau : contraste 1,87. */
.cta-panel p a {
    color: #7ab7d4;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cta-panel p a:hover {
    color: #ffffff;
}

.cta-panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: #ffffff;
    color: #0f1a24;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cta-panel-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

/* --- AUTRES FONCTIONNALITÉS / SOLUTIONS --- */
.also-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.also-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 22px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.also-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 16px 40px -18px var(--shadow-hover);
}

.also-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--bg-sub);
    color: var(--accent);
    transition: all var(--transition-speed) ease;
}

.also-card-icon svg {
    width: 22px;
    height: 22px;
}

.also-card:hover .also-card-icon {
    background: var(--accent);
    color: #ffffff;
}

.also-card-text {
    flex: 1;
    min-width: 0;
}

.also-card-text strong {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 2px;
}

.also-card-text span {
    display: block;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.also-card-arrow {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--border-dark);
    transition: all var(--transition-speed) ease;
}

.also-card:hover .also-card-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .page-hero {
        padding: 40px 0 50px 0;
    }

    .page-hero h1 {
        font-size: 38px;
    }

    .page-hero p {
        font-size: 16px;
    }

    .section-head h2 {
        font-size: 30px;
    }

    .card-grid,
    .steps-grid,
    .also-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-grid.two {
        grid-template-columns: 1fr;
    }

    .split-grid,
    .split-grid.reverse {
        grid-template-columns: 1fr;
        gap: 32px;
        direction: ltr;
    }

    /* Désactiver l'animation sur mobile (comme l'archive) */
    .fade-stagger {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 600px) {
    .page-hero h1 {
        font-size: 30px;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .icon-card,
    .step-card {
        padding: 22px;
    }

    .faq-question {
        font-size: 16px;
    }

    .cta-panel {
        padding: 40px 24px;
        border-radius: 18px;
    }

    .cta-panel h2 {
        font-size: 24px;
    }
}
