/* ============================================
   PREDIXIS - Landing Page (sans tarifs)
   Font: Montserrat (Google Fonts)
   ============================================ */

:root {
    --color-primary: #2c3e50;
    --color-accent: #3498db;
    --color-accent-dark: #2980b9;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #fff;
    --color-bg-alt: #f7f9fc;
    --color-border: #e0e6ed;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.7;
    background: var(--color-bg);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- NAVBAR ---- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo img {
    height: 36px;
}

.navbar-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---- BUTTONS ---- */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ---- HERO ---- */

.hero {
    padding: 160px 0 100px;
    background: linear-gradient(170deg, #f7f9fc 0%, #fff 60%);
}

.hero-content {
    max-width: 720px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.hero .highlight {
    color: var(--color-accent);
}

.hero-lead {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 36px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---- METRICS BAR ---- */

.metrics {
    background: var(--color-primary);
    padding: 40px 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-weight: 400;
}

/* Variante à 3 métriques (page « Comment ça marche ») */

.metrics-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ---- SECTIONS ---- */

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-bottom: 60px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- STEPS ---- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 4 rangées (numéro, icône, titre, texte) partagées par les 3 colonnes :
       un titre sur 2 lignes ne décale plus le paragraphe des colonnes voisines */
    grid-template-rows: auto auto auto auto;
    gap: 40px;
}

.step {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 0;
    text-align: center;
    position: relative;
}

.step-number {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--color-primary);
}

.step-icon svg {
    width: 100%;
    height: 100%;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    /* centré dans la rangée « titre », dont la hauteur est celle du titre
       le plus long : un titre d'une seule ligne n'est plus collé en haut */
    align-self: center;
    margin-bottom: 0;
}

.step p {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.7;
    /* l'écart titre/texte est porté ici, pas par la marge du h3, qui
       fausserait le centrage vertical ci-dessus */
    margin-top: 12px;
}

/* ---- BENEFITS ---- */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.benefit {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.benefit:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.benefit-icon svg {
    width: 100%;
    height: 100%;
}

.benefit h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.benefit p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ---- EXEMPLE DE PREVISION (graphe du mail client) ---- */

.prevision-exemple {
    max-width: 900px;
    margin: 60px auto 0;
}

.prevision-exemple img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.prevision-exemple figcaption {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* ---- HERO TAGLINE ---- */

.hero-tagline {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 16px;
}

/* ---- ENGAGEMENT ---- */

.engagement-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.engagement-text {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 48px;
    line-height: 1.8;
}

.engagement-text strong {
    color: var(--color-primary);
    font-weight: 700;
}

.engagement-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
}

.engagement-point {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    padding: 28px;
}

.engagement-icon {
    display: block;
    width: 40px;
    height: 40px;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.engagement-icon svg {
    width: 100%;
    height: 100%;
}

.engagement-point p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.engagement-point strong {
    color: var(--color-primary);
}

/* ---- CONTACT FORM ---- */

.contact-container {
    max-width: 640px;
}

.contact-form {
    background: var(--color-bg-alt);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text);
    background: #fff;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aab;
}

.form-hint {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.contact-form .btn {
    width: 100%;
    text-align: center;
    margin-top: 4px;
}

/* Honeypot anti-spam (champ caché) + bandeau de confirmation */

.predixis-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.predixis-success {
    max-width: 640px;
    margin: 0 auto 24px;
    background: #e8f6ef;
    border: 1px solid #b8e0cd;
    color: #1e7a52;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.predixis-error {
    max-width: 640px;
    margin: 0 auto 24px;
    background: #fdecea;
    border: 1px solid #f5c6c0;
    color: #b3261e;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

/* ---- FOOTER ---- */

.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 32px;
}

.footer-content {
    text-align: center;
}

.footer-logo-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo {
    height: 36px;
}

.footer-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.footer-brand p {
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Décalage de la navbar si la barre d'admin WP est visible (aperçu connecté) */

body.admin-bar .navbar {
    top: 32px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 48px;
    }

    /* une seule colonne : plus rien à aligner, on repasse en flux normal */
    .step {
        display: block;
        grid-row: auto;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    /* Le texte des axes du graphe est cuit dans l'image : réduite à 375 px de
       large elle devient illisible. On la laisse déborder et défiler. */
    .prevision-exemple-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prevision-exemple img {
        min-width: 640px;
    }

    .engagement-points {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 24px;
    }

    .section {
        padding: 64px 0;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }

    .navbar-links.open {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }
}

@media (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px;
    }
}
