/* =====================================================================
   mobile.css, Refonte mobile méticuleuse (chargé en dernier = priorité)
   Objectifs : 0 débordement horizontal, valeur perçue premium, conversion.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. SÉCURITÉ GLOBALE ANTI-DÉBORDEMENT (toutes tailles)
   La cause racine du "site cassé" sur mobile : des enfants en largeur fixe
   (ex. bouton texte en nowrap) gonflaient la page bien au-delà de l'écran.
   --------------------------------------------------------------------- */
html, body {
    max-width: 100%;
    overflow-x: clip;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

/* Autorise les enfants de grille/flex à rétrécir (évite le "grid blowout"). */
.hero-content > *,
.packs-grid > *,
.proof-items > *,
.guide-grid > *,
.container > * {
    min-width: 0;
}

/* =====================================================================
   MOBILE, jusqu'à 768px
   ===================================================================== */
@media (max-width: 768px) {

    /* --- Correctif racine : les boutons doivent pouvoir passer à la ligne --- */
    .btn {
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    /* --- Rythme vertical : sections plus respirées mais plus compactes --- */
    .section {
        padding: 40px 0;
    }
    .container {
        padding-left: 18px;
        padding-right: 18px;
    }
    .section-header {
        margin-bottom: 28px;
    }
    .section-header h2 {
        font-size: clamp(1.55rem, 6.4vw, 2rem);
        line-height: 1.2;
    }
    .section-desc {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    /* ------------------------------------------------------------------
       HERO
       ------------------------------------------------------------------ */
    .hero {
        padding: 28px 0 44px;
    }
    .hero-content {
        gap: 32px;
    }
    .hero-badge {
        font-size: 0.74rem;
        padding: 7px 14px;
        margin-bottom: 16px;
        line-height: 1.3;
    }
    .hero h1 {
        font-size: clamp(1.85rem, 8.2vw, 2.35rem);
        line-height: 1.18;
        margin-bottom: 16px;
        letter-spacing: -0.01em;
    }
    .hero-subtitle {
        font-size: 1.02rem;
        line-height: 1.55;
        margin-bottom: 26px;
    }

    /* CTA hero : empilés, pleine largeur, hauteur tactile confortable */
    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 28px;
    }
    .hero-ctas .btn {
        width: 100%;
        min-height: 54px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 1rem;
    }

    /* Réassurance : grille 2 colonnes lisible, alignée à gauche */
    .hero-trust {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 14px;
        text-align: left;
        align-items: start;
        max-width: 440px;
        margin: 0 auto;
    }
    .trust-item {
        font-size: 0.82rem;
        line-height: 1.3;
        align-items: flex-start;
    }
    .trust-item svg {
        margin-top: 1px;
    }

    /* Showcase livres : compact, centré, jamais coupé */
    .hero-visual {
        order: -1; /* visuel d'abord : impact immédiat */
    }
    .books-showcase {
        height: 230px;
    }

    /* ------------------------------------------------------------------
       SOCIAL PROOF
       ------------------------------------------------------------------ */
    .social-proof {
        padding: 26px 0;
    }
    .proof-items {
        gap: 22px 16px;
    }
    .proof-number {
        font-size: 1.75rem;
    }
    .proof-label {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    /* ------------------------------------------------------------------
       GUIDE DE CHOIX
       ------------------------------------------------------------------ */
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .guide-card {
        padding: 20px 18px;
    }
    .guide-card h4 {
        font-size: 1.05rem;
    }

    /* ------------------------------------------------------------------
       PARCOURS (la section qui vend)
       ------------------------------------------------------------------ */
    .packs-grid {
        gap: 22px;
    }
    .pack-card {
        border-radius: 18px;
        box-shadow: 0 12px 30px rgba(20, 28, 33, 0.10);
    }
    .pack-featured {
        box-shadow: 0 16px 40px rgba(14, 124, 146, 0.18);
    }
    .pack-header {
        padding: 26px 20px 20px;
    }
    .pack-name {
        font-size: 1.35rem;
    }
    .pack-body {
        padding: 22px 18px 24px;
    }
    .pack-books {
        gap: 8px;
        margin: 2px 0 18px;
    }
    .pack-thumb {
        width: 56px;
    }
    .pack-includes {
        text-align: left;
    }
    .pack-includes li {
        font-size: 0.9rem;
    }
    /* Prix bien lisible, CTA pleine largeur et bien tactile */
    .pack-pricing {
        margin: 18px 0 4px;
        padding-top: 18px;
    }
    .pack-card .btn,
    .pack-cta .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1rem;
    }

    /* Réassurance livraison/paiement sous les packs : empilée et centrée */
    .shipping-info {
        gap: 12px;
        margin-top: 22px;
    }

    /* ------------------------------------------------------------------
       LIVRES À L'UNITÉ / EBOOKS / TÉMOIGNAGES, cartes pleine largeur
       ------------------------------------------------------------------ */
    .ebook-card,
    .testimonial-card {
        border-radius: 16px;
    }

    /* ------------------------------------------------------------------
       FAQ : zones tactiles confortables
       ------------------------------------------------------------------ */
    .faq-question {
        padding: 16px 16px;
        font-size: 0.98rem;
        min-height: 52px;
    }

    /* ------------------------------------------------------------------
       CTA COLLANTE : laisse respirer le bas de page
       ------------------------------------------------------------------ */
    body {
        padding-bottom: 0;
    }
    .sticky-cta {
        padding: 10px 14px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    .sticky-cta-btn {
        min-height: 52px;
        font-size: 0.98rem;
        padding: 12px 18px;
    }

    /* Modale "En savoir plus" : confortable sur petit écran */
    .detail-modal {
        padding: 0;
        align-items: stretch;
    }
    .detail-box {
        max-width: 100%;
        min-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    .detail-body {
        max-height: none;
    }
    .detail-head {
        padding: 22px 20px 16px;
    }
    .detail-head h3 {
        font-size: 1.4rem;
    }
}

/* =====================================================================
   APPAREILS TACTILES : neutralise le :hover "collé" après un tap
   (sur mobile, une carte restait figée en état survol = visuel incohérent)
   ===================================================================== */
@media (hover: none) {
    .guide-card:hover {
        border-color: transparent;
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
    .guide-card:hover .guide-card-icon {
        background: var(--primary-light);
        color: var(--primary);
    }
    .pack-card:hover,
    .book-detail:hover {
        transform: none;
    }
}

/* =====================================================================
   PETITS ÉCRANS, jusqu'à 430px (iPhone classique)
   ===================================================================== */
@media (max-width: 430px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .hero h1 {
        font-size: clamp(1.7rem, 8.6vw, 2.05rem);
    }
    .hero-trust {
        grid-template-columns: 1fr;
        gap: 9px;
        max-width: 320px;
    }
    .proof-items {
        grid-template-columns: 1fr 1fr;
    }
    .pack-thumb {
        width: 50px;
    }
    .pack-name {
        font-size: 1.25rem;
        letter-spacing: 0.5px;
    }
}
