/* ============================================================
 * Design unifié — reprend exactement la page d'accueil (Next.js) :
 * police système, noir + accent indigo, boutons pilule, cartes
 * blanches bordées, en-tête « Marcel.ALLE ». Chargé EN DERNIER sur
 * les pages internes : il redéfinit les jetons des anciens CSS
 * (style.css, pages.css, modern.css, refonte.css).
 * ============================================================ */

:root,
html[data-theme="light"],
html[data-theme="dark"] {
    --font-accueil: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-display: var(--font-accueil);
    --font-body: var(--font-accueil);
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #6366F1;
    --accent: #6366F1;
    --dark: #0a0a0a;
    --ink: #0a0a0a;
    --light: #ffffff;
    --gray: #4a5565;
    --light-gray: #e5e7eb;
    --card-bg: #ffffff;
    --section-bg: #fafafa;
    --border: #e5e5e5;
    --border-strong: #d4d4d8;
    --shadow: none;
    --shadow-hover: 0 20px 40px -20px rgba(10, 10, 10, .18);

    color-scheme: light;
}

/* Le site est en clair uniquement, comme l'accueil */
html, body, body.refonte {
    background: #fff !important;
    color: #0a0a0a;
}
body {
    font-family: var(--font-accueil) !important;
    letter-spacing: -.005em;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6,
.section-titre, .page-hero h1, .legal-header h1 {
    font-family: var(--font-accueil) !important;
    color: #000;
    font-weight: 700;
}
h1, .page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
    line-height: 1 !important;
    letter-spacing: -.04em !important;
}
h2, .section-titre {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.03em;
}
h3 { letter-spacing: -.02em; }
/* L'accueil n'a pas de trait sous les titres de section */
main h2::after, section h2::after, .container > h2::after { display: none !important; }
p { color: #4a5565; }
a { color: inherit; }
::selection { background: #6366F1; color: #fff; }
.theme-toggle { display: none !important; }

/* ---------- En-tête (identique à l'accueil) ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e5e5;
}
.site-nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.025em;
    color: #000 !important;
    text-decoration: none;
}
.site-logo span, .site-footer-marque span { color: #6366F1; }
.site-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-links a {
    position: relative;
    display: inline-block;
    padding: .5rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    color: #364153;
    text-decoration: none;
    transition: color .3s;
}
.site-links a::after {
    content: "";
    position: absolute;
    left: 1rem;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: #6366F1;
    transition: width .3s cubic-bezier(.4, 0, .2, 1);
}
.site-links a:hover { color: #000; }
.site-links a:hover::after { width: calc(100% - 2rem); }
.site-links .site-links-cta { display: none; }
.site-nav-actions { display: flex; align-items: center; gap: .75rem; }
.site-burger {
    display: none;
    background: none;
    border: 0;
    padding: .5rem;
    margin-right: -.5rem;
    color: #000;
    font-size: 1.35rem;
    cursor: pointer;
}

@media (max-width: 1023px) {
    .site-nav-inner { padding: 0 1.25rem; }
    .site-burger { display: inline-flex; }
    .site-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 1.25rem 1.25rem;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .15);
    }
    .site-links.ouvert { display: flex; }
    .site-links a { padding: .9rem 0; font-size: 1rem; border-bottom: 1px solid #f4f4f5; }
    .site-links a::after { display: none; }
    .site-links .site-links-cta { display: block; margin-top: 1rem; }
    .site-links .site-links-cta a { width: 100%; border-bottom: 0; color: #fff; }
}
@media (max-width: 639px) {
    .site-nav-actions .btn-accueil { display: none !important; }
}

/* ---------- Boutons (pilule noire / contour noir) ---------- */
.btn-accueil,
.btn.btn-primary,
a.btn-primary,
button.btn-primary,
.navbar-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .875rem 1.75rem !important;
    border-radius: 9999px !important;
    background: #000 !important;
    color: #fff !important;
    border: 0 !important;
    font-family: var(--font-accueil) !important;
    font-size: .9375rem !important;
    font-weight: 500 !important;
    letter-spacing: -.01em;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s !important;
}
.btn-accueil:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px -8px rgba(99, 102, 241, .5) !important;
    background: #000 !important;
    color: #fff !important;
}
.site-nav .btn-accueil { padding: .625rem 1.25rem !important; font-size: .875rem !important; }
.btn.btn-outline,
a.btn-outline,
.btn-secondary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .875rem 1.75rem !important;
    border-radius: 9999px !important;
    background: transparent !important;
    color: #000 !important;
    border: 1.5px solid #000 !important;
    font-family: var(--font-accueil) !important;
    font-size: .9375rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: all .3s cubic-bezier(.4, 0, .2, 1) !important;
}
.btn.btn-outline:hover,
a.btn-outline:hover,
.btn-secondary:hover {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
    transform: translateY(-2px) !important;
}
.btn-sm { padding: .5rem 1rem !important; font-size: .8125rem !important; }
.btn-block { width: 100%; }

/* ---------- En-tête de page (comme le haut de l'accueil) ---------- */
.page-hero {
    background: #fff !important;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 4.5rem) !important;
    text-align: left !important;
    border-bottom: 1px solid #e5e5e5;
}
.page-hero::before, .page-hero::after { display: none !important; }
.page-hero .container { max-width: 80rem; text-align: left !important; }
.page-hero h1 { text-align: left !important; max-width: 64rem; }
.page-hero .container > * { margin-left: 0 !important; margin-right: 0 !important; }
.page-hero-badge {
    display: inline-flex !important;
    align-items: center;
    gap: .75rem;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
    color: #6366F1 !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    letter-spacing: .15em !important;
    text-transform: uppercase;
    box-shadow: none !important;
}
.page-hero-badge::before {
    content: "";
    width: 3rem;
    height: 1px;
    background: #6366F1;
}
.page-hero-badge i { display: none; }
.page-hero-description {
    max-width: 42rem;
    margin: 2rem 0 0 !important;
    color: #4a5565 !important;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem) !important;
    line-height: 1.6 !important;
    text-align: left !important;
}
.breadcrumb {
    justify-content: flex-start !important;
    margin-top: 2rem !important;
    font-family: var(--font-accueil) !important;
    font-size: .8125rem !important;
    color: #6a7282 !important;
}
.breadcrumb a { color: #4a5565 !important; text-decoration: none; }
.breadcrumb a:hover, .breadcrumb .current { color: #6366F1 !important; }

/* ---------- Sections et cartes ---------- */
.page-section, .section { background: #fff; }
.section-alt { background: #fafafa !important; color: #0a0a0a !important; }
/* Bloc sombre (newsletter) : noir comme la section contact de l'accueil */
.section-dark { background: #000 !important; color: #fff !important; }
.section-dark::before, .section-dark::after { display: none !important; }
.section-dark h2, .section-dark h3 { color: #fff !important; -webkit-text-fill-color: currentColor !important; background: none !important; }
.section-dark p { color: #a1a1aa !important; }
.section-dark input { background: #fff !important; border: 1px solid #3f3f46 !important; border-radius: 9999px !important; color: #0a0a0a !important; }
.section-dark button { background: #6366F1 !important; border-radius: 9999px !important; color: #fff !important; border: 0 !important; }
.value-card, .objectif-card, .fact-item, .contact-item, .svc-ligne,
.legal-container, .contact-form, .blog-card, .article-card, .card {
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 1.25rem !important;
    box-shadow: none !important;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1), box-shadow .4s, border-color .4s !important;
}
.value-card:hover, .objectif-card:hover, .blog-card:hover, .article-card:hover, .svc-ligne:hover {
    transform: translateY(-4px) !important;
    border-color: #d4d4d8 !important;
    box-shadow: 0 20px 40px -20px rgba(10, 10, 10, .18) !important;
}
.value-icon, .objectif-number, .svc-num, .fact-number { color: #6366F1 !important; background: none !important; }
.value-icon { background: #eef2ff !important; border-radius: 9999px !important; }
.tag, .svc-tech span, .public-project-tags span {
    background: #f4f4f5 !important;
    color: #364153 !important;
    border: 0 !important;
    border-radius: 9999px !important;
}

/* Bloc d'appel à l'action : noir, comme la section contact de l'accueil */
.cta-section {
    background: #000 !important;
    color: #fff !important;
    border-radius: 0 !important;
}
.cta-section::before, .cta-section::after { display: none !important; }
.cta-section h2 { color: #fff !important; }
.cta-section p { color: #a1a1aa !important; }
.cta-section .btn.btn-primary { background: #6366F1 !important; }
.cta-section .btn.btn-outline { color: #fff !important; border-color: #3f3f46 !important; }
.cta-section .btn.btn-outline:hover { background: #fff !important; color: #000 !important; border-color: #fff !important; }

/* ---------- Formulaires ---------- */
input, select, textarea {
    font-family: var(--font-accueil) !important;
}
.form-group input, .form-group select, .form-group textarea,
.newsletter-form input {
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: .875rem !important;
    color: #0a0a0a !important;
    box-shadow: none !important;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.newsletter-form input:focus {
    outline: none !important;
    border-color: #6366F1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15) !important;
}

/* ---------- Pied de page (identique à l'accueil) ---------- */
.site-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    color: #4a5565;
    font-family: var(--font-accueil);
}
.site-footer-inner { max-width: 80rem; margin: 0 auto; padding: 4rem 2rem; }
.site-footer-grille {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.site-footer-marque { font-size: 1.25rem; font-weight: 700; color: #000; margin-bottom: 1rem; }
.site-footer-apropos { max-width: 24rem; margin: 0 0 1.5rem; font-size: 1rem; line-height: 1.65; color: #4a5565; }
.site-footer-reseaux { display: flex; gap: .75rem; flex-wrap: wrap; }
.site-footer-reseaux a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5565;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.site-footer-reseaux a:hover { color: #6366F1; border-color: #6366F1; }
.site-footer h4 { font-size: .875rem; font-weight: 600; color: #000; margin: 0 0 1rem; letter-spacing: 0; }
.site-footer-col a, .site-footer-col span {
    display: block;
    margin-bottom: .75rem;
    font-size: .875rem;
    color: #4a5565;
    text-decoration: none;
    transition: color .2s;
}
.site-footer-col a:hover { color: #6366F1; }
.site-footer-bas {
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .875rem;
}
.site-footer-bas p { margin: 0; color: #6a7282; font-size: .875rem; }
.site-footer-bas p + p { color: #99a1af; }

@media (max-width: 1023px) {
    .site-footer-grille { grid-template-columns: 1fr 1fr; }
    .site-footer-grille > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
    .site-footer-inner { padding: 3rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
    .site-footer-grille { grid-template-columns: 1fr; gap: 2rem; }
    .site-footer-bas { flex-direction: column; text-align: center; }
}

/* ============================================================
 * ÉQUILIBRE DES PAGES INTERNES
 * ============================================================ */

/* 1. En-tête de page en deux colonnes : grand titre à gauche,
 *    description + actions à droite (plus de moitié droite vide).
 *    Halo indigo discret comme sur l'accueil. */
.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 18%, rgba(99, 102, 241, .11) 0, transparent 42%),
        radial-gradient(circle at 70% 95%, rgba(129, 140, 248, .07) 0, transparent 38%),
        #fff !important;
}
@media (min-width: 1024px) {
    .page-hero .container {
        display: grid !important;
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        column-gap: clamp(3rem, 6vw, 6rem);
        align-items: end;
    }
    .page-hero .container > * { grid-column: 2; }
    .page-hero .container > .page-hero-badge { grid-column: 1 / -1; justify-self: start; }
    .page-hero .container > h1 { grid-column: 1; grid-row: 2 / span 4; align-self: end; max-width: none; margin: 0 !important; }
    .page-hero .page-hero-description { margin-top: 0 !important; }
    .page-hero .container > .page-hero-description:last-child { margin-bottom: .35rem !important; }
    .page-hero .hero-buttons { margin-top: 2rem; }
}
.page-hero h1 { font-size: clamp(2.75rem, 6.5vw, 5.5rem) !important; }
.page-hero .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start !important;
}

/* 2. Titres de section alignés à gauche, comme l'accueil */
.page-section .container > h2,
.page-section .container > .subtitle,
.page-section .container > p.text-center,
.section-titre-centre,
.cta-content,
.cta-content h2,
.cta-content p {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.page-section .container > .subtitle { max-width: 42rem; }
.cta-section .container { max-width: 80rem; }
@media (min-width: 1024px) {
    /* Bloc noir d'appel à l'action : texte à gauche, boutons à droite */
    .cta-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 4rem;
        align-items: center;
        max-width: none !important;
    }
    .cta-content > * { grid-column: 1; }
    .cta-content > .cta-buttons { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; }
}
.cta-buttons { justify-content: flex-start !important; }

/* 3. Cartes alignées à gauche, plus aérées (comme les cartes de services) */
.value-card, .objectif-card, .fact-item {
    text-align: left !important;
    padding: 2.25rem 2rem !important;
}
.value-card h3, .objectif-card h4 {
    font-size: 1.2rem !important;
    line-height: 1.3;
    color: #000 !important;
    margin: 0 0 .75rem !important;
}
.value-card p, .objectif-card p { margin: 0; font-size: .975rem; line-height: 1.65; }
.value-card .value-icon { margin: 0 0 1.25rem !important; }
.objectif-number { font-size: 2.5rem !important; font-weight: 700 !important; letter-spacing: -.04em; margin: 0 0 1rem !important; }
/* Carte-lien (blog) : invitation à lire, comme les cartes projets */
a.value-card { display: flex !important; flex-direction: column; color: inherit; }
a.value-card h3 i { display: block; margin-bottom: 1rem; font-size: 1.25rem; }
a.value-card::after {
    content: "Lire l'article \2192";
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: .875rem;
    font-weight: 600;
    color: #6366F1;
}

/* 4. Articles : en-tête et texte dans la même colonne de lecture */
.page-article .page-hero .container {
    display: block !important;
    max-width: 860px !important;
}
.page-article .page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem) !important; }
.page-article .page-hero .page-hero-description { margin-top: 1.5rem !important; font-size: 1rem !important; }
.page-article .profil-text { font-size: 1.075rem; line-height: 1.8; }
.page-article .profil-text h3 { font-size: 1.6rem; margin: 2.5rem 0 1rem; color: #000; }
.page-article .profil-text p { color: #364153; }

/* 5. Mentions légales : moins de vide au-dessus, en-tête aligné à gauche */
.legal-section { padding-top: clamp(3rem, 6vw, 5rem) !important; }
.legal-header { text-align: left !important; }
.legal-header h1 { font-size: clamp(2.5rem, 5vw, 3.75rem) !important; }

/* Anciens titres en dégradé (background-clip: text) : texte noir uni */
.page-hero h1, .legal-header h1 {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
    color: #000 !important;
}

/* Fil d'Ariane : toujours sur une ligne, aligné à gauche (mobile compris) */
.breadcrumb {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: .5rem;
    text-align: left !important;
}

/* Contrastes : séparateur du fil d'Ariane, lien retour, bas de pied de page */
.breadcrumb .separator { color: #99a1af !important; }
.site-footer-bas p + p { color: #6a7282 !important; }
.back-to-home, .legal-footer a {
    color: #000 !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid #6366F1;
}
.back-to-home:hover, .legal-footer a:hover { color: #6366F1 !important; }

/* Page SEO : lignes de services en cartes aérées */
.svc-ligne {
    padding: 2.25rem 2.5rem !important;
    margin-bottom: 1rem !important;
    column-gap: 2.5rem !important;
}
.svc-ligne .svc-num { font-size: .875rem !important; font-weight: 600 !important; letter-spacing: .1em; }
.svc-ligne .svc-titre { color: #000 !important; }
.svc-ligne .svc-benefice { border-left-color: #6366F1 !important; }
@media (max-width: 767px) {
    .svc-ligne { padding: 1.75rem 1.5rem !important; }
}
