/* ============================================================
   MOBILE.CSS — Milla Fontaine
   Adaptatations smartphone uniquement (max-width: 768px)
   Le design PC est entièrement préservé.
   ============================================================ */

/* ----------------------------------------------------------
   HAMBURGER MENU — Structure de base (cachée sur desktop)
   ---------------------------------------------------------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--color-brun-terre);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
}

/* ============================================================
   BREAKPOINT PRINCIPAL — 768px
   ============================================================ */
@media (max-width: 768px) {

    /* ----------------------------------------------------------
       CURSEUR — Désactivé sur mobile (touch device)
       ---------------------------------------------------------- */
    .cursor-dot {
        display: none !important;
    }

    body,
    a,
    button,
    .btn,
    .service-item,
    .scroll-indicator,
    .consultation-card {
        cursor: auto !important;
    }

    /* ----------------------------------------------------------
       HEADER & NAVIGATION MOBILE
       ---------------------------------------------------------- */
    header {
        padding: 0.75rem 0;
        background: rgba(247, 242, 235, 0.97);
    }

    .nav-container {
        padding: 0 5%;
        position: relative;
    }

    .logo {
        font-size: 1.45rem;
    }

    /* Hamburger visible */
    .hamburger {
        display: flex;
        cursor: none; /* on remet auto via la règle body */
        cursor: auto;
    }

    /* Nav links — panneau déroulant */
    .nav-links {
        display: flex !important; /* override le "display:none" du 900px */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 75vw;
        max-width: 320px;
        height: 100dvh;
        background: var(--color-ivoire);
        box-shadow: -10px 0 40px rgba(109, 84, 74, 0.12);
        padding: 100px 2rem 3rem;
        gap: 0;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
        align-items: flex-start;
        border-left: 1px solid rgba(211, 192, 173, 0.3);
    }

    .nav-links.is-open {
        transform: translateX(0);
    }

    /* Overlay sombre derrière le menu */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(109, 84, 74, 0.25);
        backdrop-filter: blur(2px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.is-open {
        display: block;
        opacity: 1;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(211, 192, 173, 0.2);
    }

    .nav-links li:last-child {
        border-bottom: none;
        margin-top: 2rem;
    }

    .nav-links a {
        display: block;
        padding: 1.1rem 0;
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--color-brun-terre);
    }

    .nav-links a::after {
        display: none; /* retire le soulignement animé */
    }

    /* Bouton Rendez-vous dans le menu */
    .btn-nav {
        margin-left: 0;
        margin-top: 0;
        width: 100%;
        padding: 0.85rem 1.5rem;
        text-align: center;
        font-size: 0.9rem;
        justify-content: center;
    }

    /* Animation hamburger → croix */
    .hamburger.is-open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.is-open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger.is-open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* ----------------------------------------------------------
       HERO SECTION — Correction lisibilité sur mobile
       ---------------------------------------------------------- */
    .hero {
        min-height: 100dvh;
        padding-top: 0;
        /* On empile le contenu SOUS l'image en mobile */
        display: flex;
        flex-direction: column;
        align-items: stretch;
        background-image: none; /* retire le fond mixte desktop */
        background-color: var(--color-ivoire);
    }

    /* Bloc image hero — au dessus du texte */
    .hero-mobile-img {
        display: block;
        width: 100%;
        height: 52vw;
        min-height: 220px;
        max-height: 340px;
        object-fit: cover;
        object-position: center top;
    }

    /* Le container héroïque devient une colonne pleine largeur */
    .hero .container {
        margin: 0;
        padding: 2.5rem 1.4rem 1.8rem;
        width: 100%;
        max-width: 100%;
    }

    .hero-content {
        max-width: 100%;
        margin-top: 0;
        text-align: left;
    }

    .hero h1 {
        font-size: clamp(1.7rem, 6.5vw, 2.3rem);
        line-height: 1.25;
        margin-bottom: 1rem;
    }

    .hero h1 .line-2 {
        font-size: 0.88em;
    }

    .hero .text-lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .hero .btn-group {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.8rem;
        align-items: stretch;
    }

    .hero .btn-group .btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 0.88rem;
    }

    /* Scroll indicator — caché sur mobile (peu pertinent) */
    .scroll-indicator {
        display: none;
    }

    /* ----------------------------------------------------------
       SECTION ACCOMPAGNEMENT (Services)
       ---------------------------------------------------------- */
    .services-section {
        padding: 3.5rem 0;
    }

    .services-section .container {
        padding: 0 1.4rem;
    }

    .title-medium {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        margin-bottom: 1rem;
    }

    /* Titre "Je peux vous accompagner pour :" — trop long, on réduit pour garder les ':' sur la même ligne */
    .services-section .title-medium {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
    }

    .text-lead {
        font-size: 1rem;
    }

    .services-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .service-item {
        padding: 1rem 1.2rem;
        border-radius: var(--radius-sm);
    }

    .service-item:hover {
        transform: none; /* retire le survol sur touch */
    }

    /* ----------------------------------------------------------
       SECTION POURQUOI ME CONSULTER
       ---------------------------------------------------------- */
    #pourquoi {
        padding: 3.5rem 0;
    }

    #pourquoi .container {
        padding: 0 1.4rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Image en premier sur mobile */
    .about-image-wrapper {
        order: -1;
        padding: 0.5rem;
    }

    .about-image-wrapper::before {
        transform: translate(-8px, 8px);
    }

    .about-content {
        order: 1;
    }

    #pourquoi .title-medium {
        white-space: normal; /* retire le nowrap desktop */
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .about-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .consultation-card {
        padding: 1rem 1.2rem;
        border-radius: var(--radius-sm);
        margin-top: 1.5rem;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .consultation-card p {
        font-size: 0.92rem;
    }

    .about-content > div[style*="margin-top: 2rem"] {
        margin-top: 1.5rem !important;
    }

    .about-content .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
    }

    /* ----------------------------------------------------------
       FOOTER
       ---------------------------------------------------------- */
    footer {
        padding: 1.5rem 1.4rem;
    }

    footer p {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    /* ----------------------------------------------------------
       SECTIONS GLOBALES — Espacement réduit
       ---------------------------------------------------------- */
    section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.4rem;
    }
}

/* ----------------------------------------------------------
   TRÈS PETIT ÉCRAN (iPhone SE, < 380px)
   ---------------------------------------------------------- */
@media (max-width: 380px) {
    .logo {
        font-size: 1.2rem;
    }

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

    .hero .btn-group .btn {
        padding: 0.8rem 1rem;
        font-size: 0.82rem;
    }

    .nav-links {
        width: 85vw;
    }
}
