/* Correctifs mobile uniquement (n'affecte pas le PC) */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        font-size: 14px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    main {
        padding-top: 78px;
    }

    .header {
        padding: 10px 0;
    }

    .header-content {
        gap: 10px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .logo {
        min-width: auto;
        order: 1;
        flex: 0 0 auto;
    }

    .header .logo-img,
    .header .logo-link img {
        height: 18px !important;
        width: auto !important;
        max-width: 80px !important;
    }

    .footer-logo img {
        width: 72px !important;
        max-width: 72px !important;
        height: auto !important;
    }

    .offres-desktop-title,
    .offres-desktop-subtitle {
        color: #fff !important;
    }

    .nav {
        gap: 12px;
        order: 2;
        flex: 1 1 auto;
        justify-content: center;
    }

    .header-right {
        gap: 8px;
        order: 3;
        flex-wrap: nowrap;
        margin-left: auto;
        justify-content: flex-end;
        align-items: center;
        white-space: nowrap;
    }

    .phone {
        font-size: 12px;
    }

    .btn-prendre-rdv,
    .btn-login {
        padding: 6px 10px;
        font-size: 11px;
    }

    .hero {
        min-height: 220px;
        padding: 12px 10px 8px;
        background-attachment: scroll;
    }

    .hero-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding-bottom: 0;
        margin-top: 18px;
    }

    /* Logo hero: un peu plus haut sur mobile */
    .hero > img {
        top: 36px !important;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-promo {
        font-size: 30px;
    }

    .hero-mini-images {
        position: static;
        transform: none;
        margin-top: 16px;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px 10px;
        justify-items: center;
        align-items: center;
        width: 100% !important;
        max-width: 220px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-mini-image {
        width: 54px;
        height: 54px;
    }

    .hero-gifts {
        position: static;
        height: auto;
        margin-top: 6px;
    }

    .hero-car,
    .hero-main {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        width: 104px;
    }

    /* Camion plus a droite et plus bas */
    .hero-car {
        transform: translate(20px, 12px);
    }

    /* Telephone plus a gauche et un peu plus bas */
    .hero-main {
        transform: translate(-20px, 10px);
    }

    .vehicule-section > .container {
        padding: 28px 14px;
    }

    .vehicule-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .vehicule-card {
        min-height: 150px;
        padding: 12px 8px;
    }

    .vehicule-card img {
        width: 84px;
        height: 84px;
    }

    .avis-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .offre-promo-content,
    .loi-hamon-content,
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    /* Effet "dezoom" mobile: on réduit les textes et blocs globaux */
    html, body {
        font-size: 13px;
    }

    /* Barre du haut plus compacte sur telephone */
    .header {
        padding: 6px 0;
    }

    .header-content {
        gap: 4px;
        flex-wrap: wrap;
        align-items: center;
    }

    .logo {
        order: 1;
        flex: 0 0 100%;
        display: flex;
        justify-content: flex-start;
    }

    .header .logo-img,
    .header .logo-link img {
        height: 18px !important;
        max-width: 84px !important;
    }

    .footer-logo img {
        width: 110px !important;
        max-width: 110px !important;
        height: auto !important;
    }

    .nav {
        order: 2;
        flex: 0 0 auto;
        gap: 10px;
        justify-content: flex-start;
    }

    .header-right {
        order: 3;
        flex: 1 1 auto;
        justify-content: flex-end;
        margin-left: auto;
        gap: 6px;
    }

    .nav-link {
        font-size: 10px;
        padding: 2px 4px;
    }

    .phone {
        font-size: 8px;
    }

    .btn-prendre-rdv,
    .btn-login {
        font-size: 7px;
        padding: 3px 5px;
        min-height: 22px;
        line-height: 1.1;
    }

    .avantages-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .avantage-card {
        padding: 14px 10px;
        border-radius: 10px;
    }

    .avantage-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 22px;
        margin-bottom: 12px;
    }

    .avantage-card h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .avantage-card p {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Systeme de rendez-vous compact (mobile) */
    .vehicule-section {
        padding: 14px 10px;
    }

    .vehicule-section > .container {
        padding: 18px 10px;
        border-radius: 12px;
    }

    .step-content h3,
    .vehicule-section h3 {
        font-size: 16px;
        margin-bottom: 16px;
        line-height: 1.25;
    }

    #step-2,
    #step-3,
    #step-4,
    #step-5 {
        min-height: auto;
        padding: 12px 8px;
    }

    .vehicule-options {
        gap: 8px;
    }

    /* RDV mobile: rendu 2x2 (couleurs d'origine conservées) */
    #step-1 .vehicule-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
    }

    #step-1 .vehicule-card {
        min-height: 122px;
        padding: 10px 6px;
        aspect-ratio: 1 / 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #step-1 .vehicule-card img {
        width: 44px;
        height: 44px;
        object-fit: contain;
    }

    #step-1 .vehicule-card p {
        font-size: 9px;
        line-height: 1.2;
        margin-top: 6px;
    }

    /* Remonte legerement les 2 libelles demandes */
    #step-1 .vehicule-card[data-type="pare-brise"] p,
    #step-1 .vehicule-card[data-type="toit-panoramique"] p {
        margin-top: 2px;
        transform: translateY(-7px);
    }

    #step-1 .vehicule-card.active {
        transform: none;
    }

    .vehicule-actions {
        gap: 8px;
        margin-bottom: 16px;
    }

    .btn-passer,
    .btn-appuyer {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 36px;
    }

    .input-immatriculation,
    .input-nom,
    .input-telephone,
    .input-email {
        max-width: 100% !important;
        width: 100%;
        font-size: 14px;
        padding: 10px 8px;
    }

    .progress-bar {
        height: 3px;
    }

    /* "Intervention prise en charge par votre assurance" */
    .loi-hamon-text h2 {
        font-size: 26px;
        line-height: 1.2;
    }

    /* "Satisfaction client avant tout" */
    .avis-header h2 {
        font-size: 30px;
        line-height: 1.15;
    }

    /* "Comment ? Pourquoi ?" */
    .faq-header h2 {
        font-size: 30px;
        line-height: 1.15;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 360px !important;
        padding: 10px 8px 6px !important;
    }

    .hero-content {
        margin-top: 22px;
    }

    .hero > img {
        top: 30px !important;
    }

    main {
        padding-top: 58px;
    }

    .header .logo-img,
    .header .logo-link img {
        height: 16px !important;
        max-width: 72px !important;
    }

    .footer-logo img {
        width: 90px !important;
        max-width: 90px !important;
        height: auto !important;
    }

    .header-content {
        gap: 3px;
        flex-wrap: wrap;
        align-items: center;
    }

    .logo {
        flex: 0 0 100%;
    }

    .nav {
        order: 2;
        gap: 8px;
    }

    .header-right {
        order: 3;
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 4px;
    }

    .nav-link {
        font-size: 8px;
        padding: 1px 3px;
    }

    .phone {
        font-size: 8px;
    }

    .phone span:last-child { display: none; }

    .btn-prendre-rdv,
    .btn-login {
        font-size: 7px;
        padding: 2px 4px;
        min-height: 20px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .hero-promo {
        font-size: 22px;
    }

    .hero-mini-image {
        width: 48px;
        height: 48px;
    }

    .hero-mini-images {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px 10px !important;
        width: 100% !important;
        max-width: 190px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 18px !important;
    }

    .hero-car,
    .hero-main {
        width: 88px;
    }

    .hero-car {
        transform: translate(16px, 10px);
    }

    .hero-main {
        transform: translate(-16px, 8px);
    }

    .loi-hamon-text h2,
    .avis-header h2,
    .faq-header h2 {
        font-size: 24px;
    }

    /* On garde bien la grille 2x2 sur téléphone pour le step RDV */
    #step-1 .vehicule-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
    }

    .btn-prendre-rdv-hero {
        width: 100%;
        max-width: 280px;
    }

    .avantages-grid {
        gap: 8px;
    }

    .avantage-card {
        padding: 12px 8px;
    }

    .avantage-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .avantage-card h4 {
        font-size: 14px;
    }

    .avantage-card p {
        font-size: 11px;
    }

    .step-content h3,
    .vehicule-section h3 {
        font-size: 14px;
    }

    #step-1 .vehicule-card {
        min-height: 112px;
        padding: 8px 6px;
    }

    #step-1 .vehicule-card img {
        width: 38px;
        height: 38px;
    }

    #step-1 .vehicule-card p {
        font-size: 9px;
    }

    #step-1 .vehicule-card[data-type="pare-brise"] p,
    #step-1 .vehicule-card[data-type="toit-panoramique"] p {
        transform: translateY(-8px);
    }

    .btn-passer,
    .btn-appuyer {
        font-size: 10px;
        padding: 7px 10px;
        min-height: 34px;
    }

    .input-immatriculation,
    .input-nom,
    .input-telephone,
    .input-email {
        font-size: 13px;
        padding: 8px 6px;
    }
}

/* FORCE: structure du haut mobile (modele exact) */
@media (max-width: 600px) {
    .header {
        padding: 2px 0 !important;
    }

    .header .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .header .container .header-content {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "logo logo"
            "nav right" !important;
        align-items: center !important;
        gap: 1px 8px !important;
        flex-wrap: unset !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    .header .container .header-content .logo {
        grid-area: logo !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .header .container .header-content .nav {
        grid-area: nav !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    .header .container .header-content .header-right {
        grid-area: right !important;
        width: auto !important;
        margin-left: auto !important;
        justify-content: flex-end !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
    }

    .header .logo-img,
    .header .logo-link img {
        height: 18px !important;
        max-width: 86px !important;
        width: auto !important;
    }

    .header .nav-link {
        font-size: 11px !important;
        line-height: 1 !important;
        padding: 0 3px !important;
    }

    .header .phone {
        font-size: 9px !important;
        line-height: 1 !important;
    }

    .header .btn-prendre-rdv,
    .header .btn-login {
        font-size: 8px !important;
        padding: 1px 5px !important;
        min-height: 18px !important;
        height: 18px !important;
        line-height: 1 !important;
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1px 0 !important;
    }

    .header .container .header-content {
        gap: 1px 6px !important;
    }

    .header .logo-img,
    .header .logo-link img {
        height: 16px !important;
        max-width: 74px !important;
    }

    .header .nav-link {
        font-size: 10px !important;
    }

    .header .phone {
        font-size: 8px !important;
    }

    .header .btn-prendre-rdv,
    .header .btn-login {
        font-size: 7px !important;
        min-height: 17px !important;
        height: 17px !important;
        padding: 1px 4px !important;
    }

    .footer-logo img {
        width: 105px !important;
        max-width: 105px !important;
    }
}

/* ===============================
   FORCE FINAL MOBILE HEADER
   =============================== */
@media screen and (max-width: 768px) {
    header.header {
        padding: 2px 0 !important;
        min-height: unset !important;
    }

    header.header > .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    header.header .header-content {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "logo logo"
            "nav right" !important;
        align-items: center !important;
        gap: 1px 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
        flex-wrap: unset !important;
    }

    header.header .logo {
        grid-area: logo !important;
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    header.header .nav {
        grid-area: nav !important;
        display: flex !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        order: unset !important;
    }

    header.header .header-right {
        grid-area: right !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        margin-left: auto !important;
        white-space: nowrap !important;
        order: unset !important;
    }

    header.header .logo-img,
    header.header .logo-link img {
        height: 18px !important;
        max-height: 18px !important;
        width: auto !important;
        max-width: 90px !important;
        object-fit: contain !important;
    }

    header.header .nav-link {
        font-size: 11px !important;
        line-height: 1 !important;
        padding: 0 3px !important;
    }

    header.header .phone {
        font-size: 9px !important;
        line-height: 1 !important;
    }

    header.header .btn-prendre-rdv,
    header.header .btn-login {
        font-size: 8px !important;
        line-height: 1 !important;
        min-height: 18px !important;
        height: 18px !important;
        padding: 1px 5px !important;
    }

    .footer-logo img {
        width: 110px !important;
        max-width: 110px !important;
        height: auto !important;
    }
}

/* FORCE FINAL: mini-objets hero mobile */
@media screen and (max-width: 768px) {
    .hero .hero-mini-images {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 240px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 26px !important;
        gap: 10px 14px !important;
        justify-items: center !important;
        align-items: center !important;
    }

    .hero .hero-mini-images .hero-mini-image {
        width: 62px !important;
        height: 62px !important;
        max-width: 62px !important;
        max-height: 62px !important;
    }
}

@media screen and (max-width: 480px) {
    .hero .hero-mini-images {
        max-width: 220px !important;
        margin-top: 24px !important;
        gap: 10px 12px !important;
    }

    .hero .hero-mini-images .hero-mini-image {
        width: 56px !important;
        height: 56px !important;
        max-width: 56px !important;
        max-height: 56px !important;
    }
}
