/* ==========================================
   OPTIMISATIONS MOBILE-FIRST UrgencePhone
   ========================================== */

/* ==========================================
   BASE MOBILE
   ========================================== */
@media (max-width: 768px) {
    
    /* Container - Marges latérales optimales */
    .container {
        padding: 0 20px !important;
    }
    
    /* Éviter les débordements horizontaux */
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }
    
    * {
        max-width: 100%;
    }
    
    /* ==========================================
       HEADER
       ========================================== */
    
    /* Réduire la hauteur du header sur mobile */
    .header-inner {
        height: 60px !important;
    }
    
    /* Logo plus petit */
    .logo-icon {
        width: 36px !important;
        height: 36px !important;
    }
    
    .logo-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .logo-text {
        font-size: 18px !important;
    }
    
    /* Mobile : on supprime le CTA Réparer pour alléger le header */
    .btn-repair {
        display: none !important;
    }
    
    /* Icône panier plus grande et badge mieux positionné */
    .cart-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .cart-badge {
        top: -8px !important;
        right: -10px !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 12px !important;
    }
    
    /* Menu hamburger plus visible */
    .menu-toggle {
        display: flex !important;
        padding: 10px !important;
    }
    
    .menu-toggle span {
        width: 26px !important;
        height: 3px !important;
    }
    
    /* ==========================================
       BOUTONS GÉNÉRAUX
       ========================================== */
    
    .btn-primary,
    .btn-outline,
    .btn-white {
        width: 100%;
        justify-content: center;
        font-size: 15px !important;
        padding: 14px 24px !important;
    }
    
    /* ==========================================
       WIZARD DE RÉPARATION
       ========================================== */
    
    /* Titre principal */
    .repair-wizard h1,
    .wizard-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
        padding: 0 !important;
    }
    
    /* Sous-titre */
    .wizard-subtitle,
    .repair-wizard p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
    }
    
    /* Conteneur des étapes */
    .wizard-steps,
    .repair-steps {
        display: flex;
        flex-wrap: wrap;
        gap: 12px !important;
        margin-bottom: 32px !important;
        padding: 0 !important;
    }
    
    /* Étapes numérotées */
    .wizard-step,
    .repair-step {
        display: flex;
        align-items: center;
        gap: 8px !important;
        padding: 10px 14px !important;
        background: var(--gray-100);
        border-radius: var(--radius-sm);
        font-size: 13px !important;
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
    }
    
    .wizard-step.active,
    .repair-step.active {
        background: var(--red-light);
        color: var(--red);
        font-weight: 600;
    }
    
    /* Numéro de l'étape */
    .step-number {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 14px !important;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--white);
        border-radius: 50%;
        border: 2px solid var(--gray-300);
    }
    
    .wizard-step.active .step-number,
    .repair-step.active .step-number {
        background: var(--red);
        color: var(--white);
        border-color: var(--red);
    }
    
    /* Label de l'étape */
    .step-label {
        font-size: 12px !important;
        line-height: 1.2 !important;
        font-weight: 500;
    }
    
    /* Champ de recherche */
    .wizard-search,
    .device-search {
        width: 100% !important;
        margin-bottom: 24px !important;
    }
    
    .wizard-search input,
    .device-search input {
        width: 100% !important;
        padding: 14px 48px 14px 16px !important;
        font-size: 15px !important;
        border-radius: var(--radius-md) !important;
        border: 2px solid var(--gray-300) !important;
    }
    
    .search-icon {
        width: 40px !important;
        height: 40px !important;
        right: 8px !important;
    }
    
    /* Cartes de sélection (Console, etc.) */
    .device-type-card,
    .selection-card {
        padding: 24px 20px !important;
        margin-bottom: 16px !important;
        border-radius: var(--radius-lg) !important;
        text-align: center;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .device-type-card .device-icon,
    .selection-card .icon {
        font-size: 3rem !important;
        margin-bottom: 12px !important;
    }
    
    .device-type-card h3,
    .selection-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 6px !important;
    }
    
    .device-type-card p,
    .selection-card p {
        font-size: 0.85rem !important;
        color: var(--gray-600);
        line-height: 1.4 !important;
    }
    
    /* ==========================================
       CARTES ÉTAPES DE PROCESSUS
       ========================================== */
    
    .process-steps {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin: 32px 0 !important;
    }
    
    .process-step {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: 24px 20px !important;
        text-align: center;
        box-shadow: var(--shadow-sm);
    }
    
    .process-step-number {
        width: 48px !important;
        height: 48px !important;
        margin: 0 auto 16px !important;
        font-size: 24px !important;
        font-weight: 800;
        background: var(--red);
        color: var(--white);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .process-step-icon {
        font-size: 2.5rem !important;
        margin-bottom: 16px !important;
        display: block;
    }
    
    .process-step h3 {
        font-size: 1.15rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }
    
    .process-step p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        color: var(--gray-600);
    }
    
    /* ==========================================
       RÉASSURANCE PAGE ACCUEIL
       ========================================== */
    
    .up-reassurance {
        padding: 24px 20px !important;
    }
    
    .up-reassurance-inner {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .up-reassurance-item {
        gap: 12px !important;
        padding: 14px 16px !important;
        background: rgba(255,255,255,0.05);
        border-radius: 12px;
        justify-content: flex-start !important;
    }
    
    .up-ri-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }
    
    .up-ri-text h4 {
        font-size: 14px !important;
        margin-bottom: 2px !important;
    }
    
    .up-ri-text p {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
    
    /* ==========================================
       CARDS PROCESS (Étapes page accueil)
       ========================================== */
    
    .up-steps-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .up-step-card {
        padding: 20px 12px !important;
    }
    
    .up-step-number {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        margin: 0 auto 12px !important;
    }
    
    .up-step-icon {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    
    .up-step-card h3 {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .up-step-card p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    /* ==========================================
       COMMITMENTS CARDS
       ========================================== */
    
    .up-commitments-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .up-commitment-card {
        padding: 24px 20px !important;
    }
    
    .up-commitment-icon {
        width: 52px !important;
        height: 52px !important;
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }
    
    .up-commitment-card h3 {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }
    
    .up-commitment-card p {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }
    
    /* ==========================================
       TITRES ET SECTIONS
       ========================================== */
    
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
    
    /* Sections avec padding optimisé */
    section,
    .section {
        padding: 48px 0 !important;
    }
    
    /* ==========================================
       FOOTER
       ========================================== */
    
    .footer {
        padding: 32px 20px 0 !important;
    }
    
    /* Footer brand en haut, puis grille 2x2 pour les menus */
    .footer-top {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .footer-brand {
        text-align: center;
        padding-bottom: 12px;
        margin-bottom: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-brand .logo-text {
        font-size: 18px !important;
        margin-bottom: 6px !important;
    }
    
    .footer-brand p {
        font-size: 11px !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
        opacity: 0.8;
    }
    
    .footer-socials {
        justify-content: center;
        gap: 8px !important;
    }
    
    .social-link {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }
    
    /* Grille 2x2 pour toutes les colonnes de menu */
    .footer-menus {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px 16px !important;
    }
    
    .footer-col {
        text-align: left !important;
    }
    
    .footer-col h4 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .footer-col ul {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .footer-col ul li {
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
    }
    
    .footer-col ul li a {
        font-size: 11px !important;
        padding: 2px 0;
        display: block;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important;
        padding: 16px 0 !important;
        font-size: 10px !important;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 16px !important;
    }
    
    .footer-bottom p {
        margin: 0 !important;
    }
    
    .payment-methods {
        gap: 6px !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .payment-icon {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }
    
    /* ==========================================
       WIDGET WHATSAPP
       ========================================== */
    
    .whatsapp-widget {
        bottom: 80px !important;
        right: 16px !important;
    }
    
    .whatsapp-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 28px !important;
    }
    
    .whatsapp-tooltip {
        right: 68px !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        max-width: 200px !important;
    }
}

/* ==========================================
   MOBILE TRÈS PETIT (<480px)
   ========================================== */
@media (max-width: 480px) {
    
    /* Marges encore plus serrées si nécessaire */
    .container {
        padding: 0 16px !important;
    }
    
    /* Header très compact */
    .header-inner {
        height: 56px !important;
        padding: 0 16px !important;
    }
    
    .logo-text {
        font-size: 16px !important;
    }
    
    /* Étapes sur 1 colonne */
    .wizard-step,
    .repair-step {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    /* Titres plus petits */
    h1 {
        font-size: 1.65rem !important;
    }
    
    h2 {
        font-size: 1.35rem !important;
    }
    
    /* Sections moins de padding */
    section,
    .section {
        padding: 32px 0 !important;
    }
}

/* ==========================================
   TABLETTE (768px - 1024px)
   ========================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    
    .container {
        padding: 0 32px !important;
    }
    
    /* Étapes sur 2 colonnes */
    .wizard-steps,
    .repair-steps {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* Process steps sur 2 colonnes */
    .process-steps {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

/* ==========================================
   TOUCHES TACTILES (min 44x44px)
   ========================================== */
@media (hover: none) and (pointer: coarse) {
    
    /* Tous les éléments cliquables min 44x44px */
    a,
    button,
    .clickable,
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Boutons avec padding touch-friendly */
    .btn-primary,
    .btn-outline,
    .btn-white,
    .btn-repair {
        padding: 12px 20px !important;
        min-height: 48px;
    }
}

/* ==========================================
   ANIMATIONS MOBILE (réduites)
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   MODE PAYSAGE MOBILE
   ========================================== */
@media (max-width: 896px) and (orientation: landscape) {
    
    /* Réduire les hauteurs en paysage */
    .header-inner {
        height: 50px !important;
    }
    
    section,
    .section {
        padding: 32px 0 !important;
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
