/* ========================================
   LIMBO — Marketing pages styles
   Étend style.css. Mobile-first.
   ======================================== */

/* Garde-fou anti-débordement horizontal.
   Sans ça, un mot très long, une URL, un nom de produit composé ou un
   <pre>/<code> non wrapé peut pousser la largeur de la card au-delà
   du viewport mobile. .mk-section a `overflow: hidden`, donc le texte
   est juste TRONQUÉ au bord (pire UX que de wrapper).
   - `overflow-wrap: anywhere` autorise la coupure mid-mot uniquement
     quand aucun espace n'est dispo (vs `break-word` plus agressif).
   - `html,body overflow-x:hidden` neutralise un éventuel scroll page
     causé par un enfant trop large (image, iframe, formule maths…). */
html, body { overflow-x: hidden; }

/* ========================================
   Cookie consent banner — RGPD/CNIL
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 9999;
    background: #0f0f0f;
    color: #fff;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    /* Mobile-first : full-width avec marges ; desktop : bottom-left card */
    max-width: 640px;
    font-size: .9rem;
    line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
@media (min-width: 768px) {
    .cookie-banner__inner {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}
.cookie-banner__text {
    flex: 1;
}
.cookie-banner__text a {
    color: #d4c6e0;
    text-decoration: underline;
}
.cookie-banner__actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}
.cookie-btn {
    border: none;
    border-radius: .5rem;
    padding: .5rem 1rem;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, opacity .15s;
}
.cookie-btn--primary {
    background: #6dc7df;
    color: #0f0f0f;
}
.cookie-btn--primary:hover { opacity: .85; }
.cookie-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
}
.cookie-btn--ghost:hover { background: rgba(255,255,255,.08); }

/* Lien "Gérer mes cookies" dans le footer — bouton stylé comme un <a> */
.footer-cookie-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
}
.footer-cookie-link:hover { text-decoration: underline; }
.mk-section,
.mk-section * {
    overflow-wrap: anywhere;
    word-break: normal;
}
/* Médias : on les force à respecter la largeur de la card. */
.mk-section img,
.mk-section svg,
.mk-section video,
.mk-section iframe,
.mk-section table,
.mk-section pre {
    max-width: 100%;
    height: auto;
}
.mk-section pre,
.mk-section code {
    /* `code` inline garde overflow-wrap normal hérité ; <pre> bloc scroll
       horizontalement plutôt que de pousser la card. */
    white-space: pre-wrap;
}
.mk-section table { display: block; overflow-x: auto; }

.marketing-main {
    /* Transparent : laisse passer le dark #0f0f0f du body (charte home).
       Les sections internes sont des cards arrondies posées dessus. */
    background: transparent;
    /* Padding-top = 1rem pour matcher le `top: 1rem` du header fixed.
       Du coup le header SURPLOMBE le haut de la 1ère card (avec ses
       coins arrondis 2rem cachés derrière). Au scroll > 50px, le header
       passe en blanc translucide via .scrolled et les arrondis du haut
       de la card "apparaissent" en transparence. C'est l'effet "header
       qui se détache" que décrit la home. */
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Sections génériques marketing — strictement aligné sur le pattern
   .hero / .features de la home (style.css). Card arrondie max-width
   --container-max-width (1320px desktop), centrée, bg cream par défaut. */
.mk-section {
    background: var(--bg-hero, #e6e4cf);
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
    border-radius: 2rem;
    max-width: var(--container-max-width, 1320px);
    margin: 0 auto var(--section-gap, 0.75rem);
    color: #0f0f0f;
    overflow: hidden;
    position: relative;
}
/* Première section : aucun gap au-dessus -> elle vient se loger juste
   sous le header fixed, qui partage la même couleur cream. Visuellement
   les deux fusionnent à l'arrêt, puis le header se détache quand
   .scrolled passe en blanc translucide (cf. updateHeader() JS). */
.mk-section:first-of-type,
main .mk-section:first-child {
    margin-top: 0;
}

/* Home : la .hero a son propre margin-top:5rem (style.css) qui datait
   d'un layout sans <main>. Maintenant qu'on est dans .marketing-main
   qui a padding-top:1rem (overlap header), on retire le margin-top
   pour que la hero commence direct sous la marge top de main. */
.marketing-main > .hero,
.marketing-main > .hero:first-of-type {
    margin-top: 0;
}
/* Variants de largeur (rarement utilisés, gardent le pattern card) */
.mk-section--narrow { max-width: 880px; }
.mk-section--wide   { max-width: 90rem; }
/* Variant "plain" pour les articles longs (cream fatigue à la lecture) */
.mk-section--plain {
    background: #fafaf7;
}

/* Alternance auto des bg : reprend les 4 couleurs de la home pour donner
   du rythme visuel sur les sous-pages. Cream -> lavender -> peach -> cyan
   en boucle. Le bg cream (var --bg-hero) reste le défaut sur .mk-section
   donc la 1ère section conserve la teinte cream du header (fusion visuelle
   au repos). Les sections suivantes alternent. */
.marketing-main .mk-section:nth-of-type(4n+2) { background: var(--bg-benefits, #d4c6e0); }
.marketing-main .mk-section:nth-of-type(4n+3) { background: var(--bg-pricing, #f2d2c3); }
.marketing-main .mk-section:nth-of-type(4n)   { background: var(--bg-difference, #6dc7df); }
/* 4n+1 (1, 5, 9...) garde le bg cream par défaut de .mk-section */

/* Variants explicites : déclarés APRÈS l'alternance pour gagner la cascade
   (même spécificité 0,2,0 -> last declared wins). Override UNIQUEMENT
   le bg/color, le reste (padding, radius, margin) hérite de .mk-section. */
.mk-section--hero      { background: var(--bg-hero, #e6e4cf); }
.mk-section--features  { background: var(--bg-features, #7bb88c); color: #0f0f0f; }
.mk-section--benefits  { background: var(--bg-benefits, #d4c6e0); }
.mk-section--difference{ background: var(--bg-difference, #6dc7df); }
.mk-section--pricing   { background: var(--bg-pricing, #f2d2c3); }
.mk-section--cta       { background: #0f0f0f; color: #fff; text-align: center; }
.mk-section--cta a     { color: #0f0f0f; }

/* Typo */
.mk-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-dark, #1B5E3B);
    margin-bottom: 0.75rem;
}
.mk-h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.mk-h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
}
.mk-h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.mk-lead {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.mk-p { line-height: 1.7; color: #1a1a1a; margin: 0.75rem 0; }

/* Grilles cards */
.mk-grid { display: grid; gap: 1rem; }
.mk-grid--2 { grid-template-columns: 1fr; }
.mk-grid--3 { grid-template-columns: 1fr; }
.mk-grid--4 { grid-template-columns: 1fr; }

.mk-card {
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.mk-card--feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.mk-card--feature .icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(123, 184, 140, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-dark, #1B5E3B);
}

/* Pricing cards */
.mk-pricing-card {
    background: #fff;
    border: 1px solid #e6e6e0;
    border-radius: 1.25rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}
.mk-pricing-card--highlight {
    background: #0f0f0f;
    color: #fff;
    border-color: #0f0f0f;
    position: relative;
}
.mk-pricing-card--highlight .mk-pricing-tag {
    position: absolute;
    top: -0.75rem;
    right: 1rem;
    background: var(--bg-features, #7bb88c);
    color: #0f0f0f;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}
.mk-pricing-price {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
}
.mk-pricing-price small {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
}
.mk-pricing-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.mk-pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.mk-pricing-features li::before {
    content: "✓";
    color: var(--green-dark, #1B5E3B);
    font-weight: 700;
    flex-shrink: 0;
}
.mk-pricing-card--highlight .mk-pricing-features li::before {
    color: var(--bg-features, #7bb88c);
}

/* Icônes Lucide inline dans les titres h2 (remplace les emojis) */
.mk-h2-icon {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: text-bottom;
    color: var(--green-dark, #1B5E3B);
    margin-right: 0.5rem;
}

/* Liste avec coches vertes (remplace les ✅ devant li) */
.mk-checked-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}
.mk-checked-list li {
    padding: 0.55rem 0 0.55rem 1.75rem;
    position: relative;
    line-height: 1.6;
}
.mk-checked-list li::before {
    content: "✓";
    position: absolute;
    left: 0.25rem;
    top: 0.55rem;
    color: var(--green-dark, #1B5E3B);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Article styles (blog / factur-x).
   Le card section garde sa largeur normale (1320px max via .mk-section).
   Seul le contenu textuel intérieur est ramené à 720px pour la lisibilité
   (mesure de ligne idéale ~65-75 caractères). */
.mk-section.mk-article > *,
.mk-article > * {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.mk-article h2 {
    font-size: 1.625rem;
    font-weight: 700;
    margin: 2.5rem 0 0.75rem;
    line-height: 1.3;
}
.mk-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.75rem 0 0.5rem;
}
.mk-article p, .mk-article li {
    line-height: 1.75;
    color: #2a2a2a;
}
.mk-article ul, .mk-article ol {
    margin: 0.75rem 0 1.25rem 1.25rem;
}
.mk-article ul li, .mk-article ol li {
    margin: 0.4rem 0;
}
.mk-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.mk-article th, .mk-article td {
    border: 1px solid #e6e6e0;
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.mk-article th { background: #f5f4ef; font-weight: 600; }
.mk-article details {
    border: 1px solid #e6e6e0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 0.625rem 0;
    background: #fff;
}
.mk-article details summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.mk-article details summary::after { content: " ▾"; opacity: 0.5; }
.mk-article details[open] summary::after { content: " ▴"; }
.mk-article details > p {
    margin-top: 0.75rem;
    color: #555;
}

/* Breadcrumb */
.mk-breadcrumb {
    font-size: 0.875rem;
    color: #777;
    margin-bottom: 1rem;
}
.mk-breadcrumb a { text-decoration: underline; }

/* Footer */
.marketing-footer {
    background: #0f0f0f;
    color: #d4d4d4;
    margin-top: 3rem;
    padding: 2.5rem 1.25rem 1.5rem;
}
.marketing-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.marketing-footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.marketing-footer-tagline {
    font-size: 0.875rem;
    color: #999;
    line-height: 1.5;
}
.marketing-footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}
.marketing-footer ul {
    list-style: none;
    padding: 0;
}
.marketing-footer ul li {
    padding: 0.3rem 0;
}
.marketing-footer a {
    font-size: 0.875rem;
    color: #999;
}
.marketing-footer a:hover { color: #fff; }
.marketing-footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* ========================================
   Responsive (mobile-first → desktop)
   .mk-section padding utilise déjà des clamps (cf. règle de base),
   donc pas besoin de redéfinir le padding par breakpoint.
   ======================================== */
@media (min-width: 640px) {
    .mk-grid--2 { grid-template-columns: 1fr 1fr; }
    .mk-grid--3 { grid-template-columns: 1fr 1fr; }
    .mk-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    /* On NE remonte PAS le padding-top sur desktop : il reste à 1rem
       pour préserver l'overlap header / card top. */
    .mk-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
    .mk-grid--4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .marketing-footer-container { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
