/**
 * MyWIFIZONE - Styles PWA v6.1
 * Design System Mobile-First pour portail captif
 * Nouvelle Couleur Primaire : Bleu #3b82f6 (Tailwind Blue-500)
 */

/* ============================================================================
   VARIABLES CSS
   ============================================================================ */

:root {
    /* Nouvelle Palette Bleu Tech */
    --mwz-primary: #3b82f6; /* Blue-500 - Base */
    --mwz-primary-light: #60a5fa; /* Blue-400 */
    --mwz-primary-dark: #2563eb; /* Blue-600 */
    --mwz-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);

    /* Accent Orange */
    --mwz-orange: #fb923c; /* Orange Vif */

    /* Layout Header */
    --header-height: 48px; /* Hauteur du header mince */

    /* Couleurs fonctionnelles */
    --mwz-success: #16a34a;
    --mwz-success-light: #dcfce7;
    --mwz-danger: #dc2626;
    --mwz-danger-light: #fee2e2;
    --mwz-warning: #f59e0b;
    --mwz-warning-light: #fef3c7;
    --mwz-orange: #ea580c;
    --mwz-orange-light: #fff7ed;
    --mwz-green: #16a34a;
    --mwz-green-dark: #15803d;

    /* Fond et surfaces */
    --mwz-bg: #f8fafc;
    --mwz-bg-card: #ffffff;
    --mwz-bg-elevated: #ffffff;

    /* Texte */
    --mwz-text: #1e293b;
    --mwz-text-secondary: #64748b;
    --mwz-text-muted: #94a3b8;

    /* Bordures */
    --mwz-border: #e2e8f0;
    --mwz-border-light: #f1f5f9;

    /* Espacements */
    --mwz-space-1: 0.25rem;
    --mwz-space-2: 0.5rem;
    --mwz-space-3: 0.75rem;
    --mwz-space-4: 1rem;
    --mwz-space-5: 1.25rem;
    --mwz-space-6: 1.5rem;

    /* Rayons */
    --mwz-radius-sm: 6px;
    --mwz-radius-md: 8px;
    --mwz-radius-lg: 12px;
    --mwz-radius-xl: 16px;
    --mwz-radius-2xl: 20px;
    --mwz-radius-full: 9999px;

    /* Ombres */
    --mwz-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --mwz-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --mwz-shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --mwz-shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.15);

    /* Safe areas */
    --mwz-safe-top: env(safe-area-inset-top, 0);
    --mwz-safe-bottom: env(safe-area-inset-bottom, 0);
    --mwz-footer-height: 65px;
}

/* Mode sombre */
[data-theme="dark"] {
    --mwz-bg: #0f172a;
    --mwz-bg-card: #1e293b;
    --mwz-bg-elevated: #334155;
    --mwz-text: #f8fafc;
    --mwz-text-secondary: #cbd5e1;
    --mwz-text-muted: #94a3b8;
    --mwz-border: #334155;
    --mwz-border-light: #475569;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--mwz-text);
    background-color: var(--mwz-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================================================
   SPLASH SCREEN - Fond bleu gradient #3b82f6 identique a hotspot/login.html
   ============================================================================ */

.splash-screen {
    position: fixed;
    /* Fallback pour anciennes versions Android (< 87) */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* inset: 0; - moderne mais non supporte partout */
    z-index: 9999;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-transition: opacity 0.4s ease, visibility 0.4s ease;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    margin-bottom: 32px;
    animation: splashPulse 2s ease-in-out infinite;
}

.splash-logo img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.splash-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.5px;
    margin-top: 0;
}

.splash-loader {
    margin-bottom: 24px;
}

.splash-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   ADD TO HOME MODAL
   ============================================================================ */

.a2h-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--mwz-space-4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.a2h-modal.show {
    opacity: 1;
    visibility: visible;
}

.a2h-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.a2h-content {
    position: relative;
    background: var(--mwz-bg-card);
    border-radius: var(--mwz-radius-2xl);
    padding: var(--mwz-space-6);
    max-width: 340px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--mwz-shadow-xl);
}

.a2h-modal.show .a2h-content {
    transform: scale(1);
}

.a2h-close {
    position: absolute;
    top: var(--mwz-space-3);
    right: var(--mwz-space-3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mwz-bg);
    border: none;
    border-radius: var(--mwz-radius-full);
    color: var(--mwz-text-muted);
    cursor: pointer;
}

.a2h-icon {
    margin-bottom: var(--mwz-space-4);
}

.a2h-icon img {
    width: 72px;
    height: 72px;
    border-radius: var(--mwz-radius-lg);
    box-shadow: var(--mwz-shadow);
}

.a2h-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mwz-text);
    margin-bottom: var(--mwz-space-2);
}

.a2h-description {
    font-size: 0.875rem;
    color: var(--mwz-text-secondary);
    margin-bottom: var(--mwz-space-5);
}

.a2h-actions .btn {
    font-weight: 600;
}

.a2h-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-2);
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    margin-top: var(--mwz-space-4);
}

/* ============================================================================
   LAYOUT PRINCIPAL
   ============================================================================ */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: var(--mwz-bg);
    position: relative;
    overflow-x: hidden;
}

.app-main {
    flex: 1;
    /* PADDING RÉDUIT : 48px (Header) + 35px (Vagues) + 5px (Aération minimale) = 88px */
    padding-top: 88px;
    padding-bottom: calc(var(--mwz-footer-height) + var(--mwz-safe-bottom));
    overflow-y: auto;
    position: relative;
    z-index: 10;
    /* Optimisation Scroll iOS */
    -webkit-overflow-scrolling: touch;
}

/* Contenu scrollable (alternative à .app-main) */
.scrollable-content {
    min-height: 100vh;
    width: 100%;
    /* PADDING RÉDUIT : 48px (Header) + 35px (Vagues) + 5px (Aération minimale) */
    padding-top: 88px;
    padding-bottom: 60px; /* Espace réduit pour le footer */
    position: relative;
    z-index: 10;
    /* Optimisation Scroll iOS */
    -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   HEADER "INFINITY LAYERED WAVES" - Design GEMINI v6.1
   BARRE D'ETAT BLEUE: Le header s'etend sous la status bar iOS/Android
   ============================================================================ */

/* 1. Positionnement FIXE (reste en place au scroll) */
.header-fixed {
    position: fixed; /* FIXE - ne bouge pas au scroll */
    top: 0;
    left: 0;
    width: 100%;
    /* Hauteur = 48px + safe-area-inset pour couvrir la status bar */
    height: calc(48px + env(safe-area-inset-top, 0px));
    /* Padding-top pour pousser le contenu sous la status bar */
    padding-top: env(safe-area-inset-top, 0px);
    background-color: #3b82f6; /* Bleu Blue-500 explicite - ETEND A LA STATUS BAR */
    z-index: 1000; /* Priorité visuelle maximale */
    box-shadow: none; /* Pas d'ombre - les vagues font la transition */
}

/* Extension du header dans la zone safe-area (status bar) */
.header-fixed::before {
    content: '';
    position: absolute;
    top: calc(-1 * env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background-color: #3b82f6; /* Meme bleu que le header */
    z-index: -1;
}

/* 2. Contenu du bloc solide - Barre mince (48px) */
.header-solid {
    height: 48px; /* Hauteur fixe du contenu */
    width: 100%;
    display: flex;
    align-items: center;
}

/* 3. Container des Vagues (Transparence) - FIXE aussi */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px; /* Hauteur de la zone ondulée */
    transform: translateY(100%); /* Colle les vagues JUSTE SOUS le header */
    z-index: 1000;
    pointer-events: none; /* Permet de cliquer à travers les zones transparentes */
    overflow: visible; /* Important pour laisser dépasser sur les côtés */
}

/* 4. L'effet "Infinity Edge" (Largeur > 100%) */
.waves-container svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Centrage parfait */
    min-width: 150%; /* C'est ICI que se joue l'effet "Bords Infinis" */
    height: 100%;
    display: block;
}

/* Boutons Header (Transparents) - Logo plus grand sans marge */
.btn-header {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
}

.btn-header:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* Logo dans le header - Plus grand et visible */
.header-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
}

.text-warning {
    color: var(--mwz-orange) !important;
}

/* DEPRECATED: Anciens styles - conserves pour compatibilite */
.header-infinity {
    display: none;
}

.header-waves-infinity {
    display: none;
}

.header-curved {
    display: none;
}

.header-curve {
    display: none;
}

.app-header-wrapper {
    display: none;
}

.app-header {
    display: none;
}

.app-header-infinity {
    display: none;
}

.header-infinity-curves {
    display: none;
}

.infinity-waves-svg {
    display: none;
}

.wave-layer {
    display: none;
}

.header-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Margins supprimés - espace minimal */
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 12px;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 var(--mwz-space-2);
    min-width: 0;
}

/* Nom entreprise centre avec auto-ajustement */
.header-title-centered {
    font-size: clamp(0.875rem, 4vw, 1.25rem);
    font-weight: 700;
    color: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Boutons cercle pour logo et notifications */
.header-btn-circle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1.5px solid rgba(200, 200, 200, 0.6);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    overflow: hidden;
}

.header-btn-circle:hover {
    background: rgba(255, 255, 255, 0.7);
}

.header-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Ancien style header-btn (backup) */
.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--mwz-radius-md);
    color: var(--mwz-text);
    cursor: pointer;
    transition: background 0.2s;
}

.header-btn:hover {
    background: var(--mwz-border-light);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-3);
}

/* Style du Logo Texte */
.header-logo {
    letter-spacing: -0.03em;
    z-index: 20;
    line-height: 1;
}

/* Titre central dans le header mince */
.header-title-wrapper {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}

/* Badge Notification Header */
.notif-badge {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 2px solid white;
    background-color: #ef4444; /* Red-500 */
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mwz-text);
}

.header-notif {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--mwz-danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* DEPRECATED: Anciens styles de header - conserves pour compatibilite */
.app-header-clean {
    position: relative;
    overflow: hidden;
}

.header-waves-clean {
    display: none;
}

.header-waves-inside {
    display: none;
}

.app-header-with-waves {
    display: none;
}

/* Bouton Logo SANS cercle (flat) */
.header-btn-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header-logo-img-flat {
    width: 32px;
    height: 32px;
    border-radius: var(--mwz-radius-md);
    object-fit: cover;
}

/* Bouton Notifications SANS cercle */
.header-btn-notif {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: white;
    position: relative;
}

.header-btn-notif svg {
    fill: white;
}

/* Ancien: Courbes SVG (Vagues) sous le header - DEPRECATED */
.header-waves-wrapper {
    position: relative;
    width: 100%;
    height: 35px;
    overflow: visible;
    background: transparent;
    display: none; /* Desactive - utiliser header-waves-inside */
}

.header-waves-wrapper svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 150%;
    height: 100%;
    display: block;
}

/* ============================================================================
   SIDEBAR (OFFCANVAS)
   ============================================================================ */

.sidebar-offcanvas {
    width: 280px !important;
    border: none !important;
}

.sidebar-header {
    background: #3b82f6; /* Bleu Blue-500 explicite */
    color: white;
    padding: var(--mwz-space-5);
}

.sidebar-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-3);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--mwz-radius-lg);
    padding: 8px;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.sidebar-body {
    padding: var(--mwz-space-4);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-item {
    margin-bottom: var(--mwz-space-1);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-3);
    padding: var(--mwz-space-3) var(--mwz-space-3);
    border-radius: var(--mwz-radius-md);
    color: var(--mwz-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--mwz-border-light);
    color: var(--mwz-primary);
}

.sidebar-link-btn {
    justify-content: flex-start;
}

.sidebar-divider {
    margin: var(--mwz-space-4) 0;
    border: none;
    border-top: 1px solid var(--mwz-border-light);
}

.sidebar-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 var(--mwz-space-3);
    margin-bottom: var(--mwz-space-2);
}

.sidebar-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    background: var(--mwz-border-light);
    padding: 2px 8px;
    border-radius: var(--mwz-radius-full);
}

.sidebar-footer {
    padding: var(--mwz-space-4);
    border-top: 1px solid var(--mwz-border-light);
    text-align: center;
}

.sidebar-copyright {
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    margin: 0;
}

.sidebar-version {
    font-size: 0.625rem;
    color: var(--mwz-text-muted);
    margin: var(--mwz-space-1) 0 0;
}

/* Help Steps in Modal */
.help-steps {
    text-align: left;
}

.help-step {
    display: flex;
    gap: var(--mwz-space-3);
    padding: var(--mwz-space-3) 0;
}

.help-step + .help-step {
    border-top: 1px solid var(--mwz-border-light);
}

.help-step-number {
    width: 28px;
    height: 28px;
    background: var(--mwz-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.help-step-content h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mwz-text);
    margin-bottom: 2px;
}

.help-step-content p {
    font-size: 0.8125rem;
    color: var(--mwz-text-secondary);
    margin: 0;
}

/* ============================================================================
   CARROUSEL - Corrige avec peek effect 15%
   ============================================================================ */

.carousel-section {
    margin-bottom: var(--mwz-space-3);
    padding: 0;
    margin-top: 0; /* Réduit l'espace avec le header */
}

.carousel-container {
    position: relative;
}

.carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: var(--mwz-space-2);
    /* Padding pour apercu 5% de chaque cote */
    padding: 0 5%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    /* 90% = slide visible, laissant 5% prev + 5% next */
    flex: 0 0 90%;
    scroll-snap-align: center;
    border-radius: var(--mwz-radius-xl);
    overflow: hidden;
    min-height: 160px;
}

.carousel-slide-content {
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.carousel-slide-promo {
    padding: var(--mwz-space-5);
    color: white;
    justify-content: space-between;
}

.carousel-slide-icon {
    margin-bottom: var(--mwz-space-2);
    opacity: 0.9;
}

.carousel-slide-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--mwz-space-1);
}

.carousel-slide-desc {
    font-size: 0.875rem;
    opacity: 0.9;
}

.carousel-slide-btn {
    margin-top: var(--mwz-space-3);
    align-self: flex-start;
}

.carousel-slide-image img,
.carousel-slide-video video {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

.carousel-slide-iframe iframe {
    width: 100%;
    height: 100%;
    min-height: 160px;
    border: none;
}

/* Indicateurs carousel */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: var(--mwz-space-2);
    margin-top: var(--mwz-space-4);
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mwz-border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicator.active {
    width: 24px;
    border-radius: var(--mwz-radius-full);
    background: var(--mwz-primary);
}

/* ============================================================================
   BOUTONS PRINCIPAUX - CORRIGES
   ============================================================================ */

.btn-connect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-2);
    width: 100%;
    padding: var(--mwz-space-4);
    background: var(--mwz-primary) !important;
    color: white !important;
    border: none;
    border-radius: var(--mwz-radius-xl);
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s;
}

.btn-connect:hover {
    background: var(--mwz-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-connect:active {
    transform: translateY(0);
}

.connect-section {
    margin-bottom: var(--mwz-space-1);
}

/* Ligne de liens actions (Installer + Creer compte) */
.action-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--mwz-space-3);
    gap: var(--mwz-space-3);
}

/* Lien Installer l'Appli - clignotant */
.install-app-link {
    display: inline-flex;
    align-items: center;
    gap: var(--mwz-space-1);
    color: var(--mwz-orange);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.install-app-link:hover {
    color: #c2410c;
}

.install-app-link svg {
    flex-shrink: 0;
}

/* Animation clignotante pour le lien Installer */
.blink-link {
    animation: blinkOrange 1.5s ease-in-out infinite;
}

@keyframes blinkOrange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Lien Creer un Compte */
.create-account-link {
    display: inline-flex;
    align-items: center;
    gap: var(--mwz-space-1);
    color: var(--mwz-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.create-account-link:hover {
    color: var(--mwz-primary-dark);
    text-decoration: underline;
}

.create-account-link svg {
    flex-shrink: 0;
}

/* DEPRECATED - ancien wrapper */
.create-account-link-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--mwz-space-3);
}

/* Error Banner */
.error-banner {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-3);
    padding: var(--mwz-space-3) var(--mwz-space-4);
    background: var(--mwz-danger-light);
    color: var(--mwz-danger);
    border-radius: var(--mwz-radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================================================
   SECTION FORFAITS - COMPLETE
   ============================================================================ */

/* Note: .plans-section est defini dans la section PLANS / FORFAITS plus bas */

.plans-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--mwz-space-4);
}

.plans-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mwz-text);
}

.plans-link {
    font-size: 0.8125rem;
    color: var(--mwz-primary);
    text-decoration: none;
    font-weight: 600;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--mwz-space-3);
}

.plan-card {
    background: var(--mwz-bg-card);
    border: 1px solid var(--mwz-border);
    border-radius: var(--mwz-radius-xl);
    padding: var(--mwz-space-4);
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.plan-card:hover {
    border-color: var(--mwz-primary);
    box-shadow: var(--mwz-shadow);
}

.plan-card.popular {
    border-color: var(--mwz-orange);
    border-width: 2px;
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--mwz-orange);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0 var(--mwz-radius-xl) 0 var(--mwz-radius-md);
    text-transform: uppercase;
}

.plan-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--mwz-space-3);
    background: var(--mwz-border-light);
    border-radius: var(--mwz-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mwz-primary);
}

.plan-card.popular .plan-icon {
    background: var(--mwz-orange-light);
    color: var(--mwz-orange);
}

.plan-duration {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    margin-bottom: var(--mwz-space-1);
}

.plan-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mwz-text);
    margin-bottom: var(--mwz-space-2);
}

.plan-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mwz-primary);
    margin-bottom: var(--mwz-space-1);
}

.plan-card.popular .plan-price {
    color: var(--mwz-orange);
}

.plan-details {
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    margin-bottom: var(--mwz-space-3);
}

.plan-btn {
    width: 100%;
    padding: var(--mwz-space-2) var(--mwz-space-3);
    border-radius: var(--mwz-radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--mwz-border);
    background: var(--mwz-bg);
    color: var(--mwz-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.plan-btn:hover {
    background: var(--mwz-primary);
    border-color: var(--mwz-primary);
    color: white;
}

.plan-card.popular .plan-btn {
    background: var(--mwz-orange);
    border-color: var(--mwz-orange);
    color: white;
}

.plan-card.popular .plan-btn:hover {
    background: #c2410c;
    border-color: #c2410c;
}

/* ============================================================================
   FOOTER NAVIGATION - 5 boutons, hauteur reduite de 20%, actif fond bleu
   ============================================================================ */

/* Footer Menu - Fond bleu #3b82f6 - Hauteur réduite de 20% */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #3b82f6; /* Bleu explicite */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: none;
    /* Padding réduit de 20%: était 2px, maintenant 1px */
    padding: 1px var(--mwz-space-1) calc(1px + var(--mwz-safe-bottom));
    z-index: 100;
    /* Ombre superieure pour effet "flottant" */
    box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.25), 0 -1px 6px rgba(59, 130, 246, 0.15);
}

/* Extension du footer dans la zone safe-area (navigation bar Android + home indicator iOS) */
.app-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    /* Deborder sur toute la largeur ecran (pas limite a max-width 480px) */
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: env(safe-area-inset-bottom, 0px);
    background-color: #3b82f6; /* Meme bleu que le footer */
    z-index: -1;
}

/* PWA Standalone: colorer les zones systeme (status bar + navigation bar) en bleu */
@media all and (display-mode: standalone) {
    /* Le html a un fond bleu pour que les zones safe-area (top/bottom) soient bleues */
    html {
        background-color: #3b82f6;
    }
    .app-footer {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .app-footer::after {
        height: calc(8px + env(safe-area-inset-bottom, 0px));
    }
}

/* Nav 5 boutons - Padding réduit de 40% total */
.footer-nav-5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer boutons - Hauteur réduite de 20% */
.footer-btn-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px; /* Réduit de 2px à 1px */
    flex: 1;
    padding: 2px 3px; /* Réduit de 4px à 2px */
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.625rem; /* Réduit de 0.6875rem */
    font-weight: 600;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--mwz-radius-md);
}

/* Icones gardent leur taille */
/* Icônes footer réduites de 20% */
.footer-btn-5 svg {
    width: 20px; /* Réduit de 26px */
    height: 20px;
}

/* Logo MyWIFIZONE SANS cercle pour bouton Accueil - Réduit de 20% */
.footer-btn-5 .footer-logo-circle {
    width: 22px; /* Réduit de 28px */
    height: 22px;
    border-radius: var(--mwz-radius-sm);
    border: none;
    object-fit: cover;
}

.footer-btn-5:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-btn-5.active {
    color: var(--mwz-primary);
    background: white;
    border-radius: var(--mwz-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-btn-5.active svg {
    color: var(--mwz-primary);
}

.footer-btn-5.active .footer-logo-circle {
    border-color: var(--mwz-primary);
}

/* Ancien style 4 boutons (backup) */
.footer-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--mwz-space-2) var(--mwz-space-3);
    color: var(--mwz-text-muted);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 64px;
}

.footer-btn svg {
    width: 24px;
    height: 24px;
}

.footer-btn:hover,
.footer-btn.active {
    color: var(--mwz-primary);
}

.footer-btn-primary {
    color: var(--mwz-primary);
}

.footer-btn-primary svg {
    color: var(--mwz-primary);
}

/* ============================================================================
   ACTION SHEET - Style iOS-like corrige
   ============================================================================ */

.action-sheet {
    border-top-left-radius: var(--mwz-radius-2xl) !important;
    border-top-right-radius: var(--mwz-radius-2xl) !important;
    height: auto !important;
    max-height: 85vh;
    border: none !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

.action-sheet-handle-wrapper {
    display: flex;
    justify-content: center;
    padding: var(--mwz-space-3) 0 var(--mwz-space-1);
}

.action-sheet-handle {
    width: 48px;
    height: 5px;
    background: var(--mwz-border);
    border-radius: var(--mwz-radius-full);
}

.action-sheet-header {
    padding: var(--mwz-space-2) var(--mwz-space-5) var(--mwz-space-4) !important;
    border-bottom: 1px solid var(--mwz-border-light);
}

.action-sheet-header .offcanvas-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mwz-text);
}

.action-sheet-body {
    padding: var(--mwz-space-4) var(--mwz-space-5) !important;
    padding-bottom: calc(var(--mwz-space-6) + var(--mwz-safe-bottom)) !important;
}

/* Login Tabs - Corrige style comme simulation */
.login-tabs-container {
    margin-bottom: var(--mwz-space-5);
}

.login-tabs {
    display: flex;
    background: var(--mwz-border-light);
    padding: 4px;
    border-radius: var(--mwz-radius-lg);
    gap: 0;
}

.login-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--mwz-space-2) var(--mwz-space-3);
    border: none;
    background: transparent;
    border-radius: var(--mwz-radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.login-tab:hover {
    color: var(--mwz-text-secondary);
}

.login-tab.active {
    background: var(--mwz-bg-card);
    box-shadow: var(--mwz-shadow-sm);
    color: var(--mwz-green-dark);
}

.login-tab[data-login-tab="panelCode"].active {
    color: var(--mwz-orange);
}

.login-tab[data-login-tab="panelAccount"].active {
    color: var(--mwz-primary);
}

.login-tab svg {
    width: 18px;
    height: 18px;
}

/* Login Panels */
.login-panel {
    display: none;
}

.login-panel.active,
.login-panel:not(.d-none) {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-step {
    animation: fadeSlideIn 0.3s ease;
}

.login-description {
    font-size: 0.875rem;
    color: var(--mwz-text-secondary);
    margin-bottom: var(--mwz-space-4);
    line-height: 1.5;
}

/* Bouton retour */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: var(--mwz-space-2);
    padding: var(--mwz-space-2) 0;
    margin-bottom: var(--mwz-space-3);
    background: none;
    border: none;
    color: var(--mwz-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-back:hover {
    color: var(--mwz-primary);
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    background: var(--mwz-border-light);
    border: 1.5px solid #94a3b8;
    border-radius: var(--mwz-radius-xl);
    overflow: hidden;
    margin-bottom: var(--mwz-space-4);
    transition: all 0.2s;
}

.phone-input-group:focus-within {
    border-color: var(--mwz-green);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.country-select {
    width: auto;
    min-width: 100px;
    padding: var(--mwz-space-3) var(--mwz-space-3);
    background: var(--mwz-bg);
    border: none;
    border-right: 1.5px solid #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mwz-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.country-select:focus {
    outline: none;
}

/* Phone Input Wrapper avec icone WhatsApp */
.phone-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.phone-input-wrapper .whatsapp-icon,
.phone-input-wrapper .phone-input-icon {
    position: absolute;
    left: var(--mwz-space-3);
    pointer-events: none;
    flex-shrink: 0;
}

.phone-input-wrapper .phone-input {
    padding-left: calc(var(--mwz-space-3) + 28px);
}

.phone-input {
    flex: 1;
    padding: var(--mwz-space-3) var(--mwz-space-4);
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.phone-input:focus {
    outline: none;
}

.phone-input::placeholder {
    color: #64748b;
    font-weight: 600;
}

/* Champs optionnels (Nom/Prenom) */
.optional-fields {
    margin-top: var(--mwz-space-4);
    margin-bottom: var(--mwz-space-4);
    padding: var(--mwz-space-3);
    background: var(--mwz-border-light);
    border-radius: var(--mwz-radius-lg);
}

.optional-fields-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--mwz-space-2);
    text-align: center;
}

.optional-fields .form-control {
    background: var(--mwz-bg-card);
    border: 1px solid var(--mwz-border);
    border-radius: var(--mwz-radius-md);
    padding: var(--mwz-space-2) var(--mwz-space-3);
    font-size: 0.9375rem;
}

/* OTP Inputs - Corrige pour 7 chiffres */
.otp-container {
    margin-bottom: var(--mwz-space-4);
}

.otp-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--mwz-space-3);
    text-align: center;
}

.otp-input-group {
    display: flex;
    justify-content: center;
    gap: var(--mwz-space-2);
}

.otp-input {
    width: 38px;
    height: 48px;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    background: var(--mwz-border-light);
    border: 1.5px solid #94a3b8;
    border-radius: var(--mwz-radius-md);
    transition: all 0.2s;
}

.otp-input:focus {
    outline: none;
    border-color: var(--mwz-green);
    background: var(--mwz-bg-card);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.otp-hint {
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    text-align: center;
    margin-top: var(--mwz-space-3);
}

/* OTP inputs en mode password : gros points centres */
.otp-input[type="password"] {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0;
}

/* Label + oeil sur la meme ligne */
.otp-label-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--mwz-space-3);
}
.otp-label-row .otp-label {
    margin-bottom: 0;
}

/* Bouton toggle oeil pour afficher/masquer le mot de passe OTP */
.otp-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem;
    background: none;
    border: none;
    color: var(--mwz-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.2s;
    margin: 0;
}
.otp-password-toggle:hover {
    color: var(--mwz-primary);
}
.otp-password-toggle .eye-icon {
    flex-shrink: 0;
}

/* Indicateur de force du mot de passe */
.password-strength-bar {
    display: none;
    align-items: center;
    gap: 0.5rem;
}
.password-strength-bar.active {
    display: flex;
}
.strength-track {
    flex: 1;
    height: 4px;
    background: var(--mwz-border-light);
    border-radius: 2px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
}
.strength-text {
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* Message auto-reveal du mot de passe */
.otp-hint.verify-hint {
    color: var(--mwz-primary);
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

/* Bloc optionnel Infos Perso (collapse) */
.optional-info-section {
    text-align: center;
}
.optional-info-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.optional-info-toggle:hover {
    color: var(--mwz-primary);
}
.optional-info-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.optional-info-toggle[aria-expanded="true"] .optional-info-chevron {
    transform: rotate(90deg);
}

/* Champs du bloc optionnel */
.form-floating-mini {
    position: relative;
}
.form-input-mini {
    width: 100%;
    height: 42px;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.85rem;
    color: var(--mwz-text-primary);
    background: var(--mwz-bg-card);
    border: 1.5px solid var(--mwz-border);
    border-radius: var(--mwz-radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input-mini:focus {
    border-color: var(--mwz-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.form-input-mini::placeholder {
    color: transparent;
}
.form-label-mini {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--mwz-text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
}
.form-input-mini:focus + .form-label-mini,
.form-input-mini:not(:placeholder-shown) + .form-label-mini {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.68rem;
    background: var(--mwz-bg-card);
    padding: 0 0.25rem;
    color: var(--mwz-primary);
}

/* Lien J'ai deja un compte */
.already-account-link {
    font-size: 0.8rem;
    color: var(--mwz-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.already-account-link:hover {
    color: var(--mwz-primary);
    text-decoration: underline;
}

/* Code Input */
.code-input-container {
    margin-bottom: var(--mwz-space-4);
}

.code-input {
    text-align: center;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #1e293b !important;
}

.code-input::placeholder {
    color: #64748b !important;
    font-weight: 600 !important;
}

/* Password Input */
.form-group {
    margin-bottom: var(--mwz-space-4);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--mwz-space-2);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--mwz-text-muted);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--mwz-text-secondary);
}

/* Login Help Row - Deux liens cote a cote */
.login-help-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--mwz-space-5);
    padding-top: var(--mwz-space-4);
    border-top: 1px solid var(--mwz-border-light);
    gap: var(--mwz-space-3);
}

.login-help-link {
    display: inline-flex;
    align-items: center;
    gap: var(--mwz-space-1);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mwz-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.login-help-link:hover {
    color: var(--mwz-primary);
}

.login-help-link svg {
    flex-shrink: 0;
}

/* Ancien style (fallback) */
.login-help {
    text-align: center;
    margin-top: var(--mwz-space-5);
    padding-top: var(--mwz-space-4);
    border-top: 1px solid var(--mwz-border-light);
}

.login-help a {
    display: inline-flex;
    align-items: center;
    gap: var(--mwz-space-2);
    font-size: 0.875rem;
    color: var(--mwz-text-muted);
    text-decoration: none;
}

.login-help a:hover {
    color: var(--mwz-primary);
}

/* Boutons Action Sheet */
.action-sheet .btn-primary {
    background: var(--mwz-green) !important;
    border-color: var(--mwz-green) !important;
    font-weight: 600;
}

.action-sheet .btn-primary:hover {
    background: var(--mwz-green-dark) !important;
    border-color: var(--mwz-green-dark) !important;
}

#panelCode .btn-primary {
    background: var(--mwz-text) !important;
    border-color: var(--mwz-text) !important;
}

#panelCode .btn-primary:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
}

#panelAccount .btn-primary {
    background: var(--mwz-primary) !important;
    border-color: var(--mwz-primary) !important;
}

#panelAccount .btn-primary:hover {
    background: var(--mwz-primary-dark) !important;
    border-color: var(--mwz-primary-dark) !important;
}

/* ============================================================================
   FORM CONTROLS BOOTSTRAP OVERRIDE
   ============================================================================ */

.form-control {
    padding: var(--mwz-space-3) var(--mwz-space-4);
    border: 1px solid var(--mwz-border);
    border-radius: var(--mwz-radius-lg);
    background: var(--mwz-border-light);
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--mwz-primary);
    background: var(--mwz-bg-card);
    box-shadow: 0 0 0 3px rgba(0,119,204,0.15);
}

.form-control::placeholder {
    color: #64748b;
    font-weight: 600;
}

/* Buttons Bootstrap Override */
.btn {
    font-weight: 600;
    border-radius: var(--mwz-radius-lg);
    transition: all 0.2s;
}

.btn-lg {
    padding: var(--mwz-space-3) var(--mwz-space-5);
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--mwz-primary);
    border-color: var(--mwz-primary);
}

.btn-primary:hover {
    background: var(--mwz-primary-dark);
    border-color: var(--mwz-primary-dark);
}

.btn-outline-primary {
    color: var(--mwz-primary);
    border-color: var(--mwz-primary);
}

.btn-outline-primary:hover {
    background: var(--mwz-primary);
    border-color: var(--mwz-primary);
}

.btn-outline-secondary {
    color: var(--mwz-text-secondary);
    border-color: var(--mwz-border);
}

/* ============================================================================
   UTILITAIRES
   ============================================================================ */

.d-none { display: none !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center; }
.text-muted { color: var(--mwz-text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--mwz-space-2) !important; }
.mb-3 { margin-bottom: var(--mwz-space-3) !important; }
.mb-4 { margin-bottom: var(--mwz-space-4) !important; }
.mt-2 { margin-top: var(--mwz-space-2) !important; }
.mt-3 { margin-top: var(--mwz-space-3) !important; }
.me-2 { margin-right: var(--mwz-space-2) !important; }
.ms-2 { margin-left: var(--mwz-space-2) !important; }
.mx-3 { margin-left: var(--mwz-space-3) !important; margin-right: var(--mwz-space-3) !important; }
.px-3 { padding-left: var(--mwz-space-3) !important; padding-right: var(--mwz-space-3) !important; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (min-width: 576px) {
    body {
        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
        padding: var(--mwz-space-5) 0;
    }

    .app-container {
        border-radius: var(--mwz-radius-2xl);
        box-shadow: var(--mwz-shadow-xl);
        overflow: hidden;
    }

    .app-footer {
        border-radius: 0 0 var(--mwz-radius-2xl) var(--mwz-radius-2xl);
    }
}

@media (max-width: 359px) {
    .otp-input {
        width: 32px;
        height: 42px;
        font-size: 1rem;
    }

    .country-select {
        min-width: 85px;
        font-size: 0.75rem;
    }

    .carousel-slide {
        flex: 0 0 88%;
    }
}

@media (min-width: 500px) {
    .carousel-slide {
        flex: 0 0 88%;
    }

    .carousel-wrapper {
        padding: 0 6%;
    }
}

/* ============================================================================
   PLANS / FORFAITS
   ============================================================================ */

.plans-section {
    padding: 0 var(--mwz-space-3);
    padding-bottom: 0; /* Supprimé l'espace en bas */
}

.plans-wrapper {
    background: var(--mwz-surface);
    border-radius: var(--mwz-radius-xl);
    padding: var(--mwz-space-4);
}

.plans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mwz-space-3);
}

.plans-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--mwz-text);
    margin: 0;
}

.plans-view-all {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mwz-primary);
    text-decoration: none;
}

.plans-view-all:hover {
    text-decoration: underline;
}

.plans-subtitle {
    font-size: 0.875rem;
    color: var(--mwz-text-secondary);
    margin: 0;
}

/* Grille 3 colonnes x 2 lignes - espacement reduit de moitie */
.plans-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 100%;
}

/* Taille augmentee de 25% - padding reduit */
.plan-card-compact {
    background: var(--mwz-bg-card);
    border: 2px solid var(--mwz-border);
    border-radius: var(--mwz-radius-lg);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-width: 0;
}

/* Couleurs bordures forfaits - GRIS UNIFORME */
.plan-card-compact:nth-child(n) { border-color: #9ca3af; } /* Gris */

.plan-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--mwz-shadow);
}

.plan-card-top {
    border-color: var(--mwz-primary) !important;
    box-shadow: 0 0 0 1px rgba(0, 119, 204, 0.2);
}

.plan-badge-top {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--mwz-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 3px 8px;
    border-bottom-left-radius: var(--mwz-radius-md);
    border-top-right-radius: calc(var(--mwz-radius-lg) - 1px);
}

/* Rectangle arrondi pour la duree (remplace le cercle) - +25% */
.plan-icon-compact {
    min-width: 50px;
    padding: 5px 10px;
    height: auto;
    border-radius: var(--mwz-radius-md);
    background: var(--mwz-border-light);
    color: var(--mwz-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: var(--mwz-space-2);
}

.plan-icon-popular {
    background: rgba(0, 119, 204, 0.1);
    color: var(--mwz-primary);
}

/* Nom du forfait - +25% */
.plan-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mwz-text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

/* Prix - +25% */
.plan-price-compact {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--mwz-text);
    margin-bottom: var(--mwz-space-1);
}

/* Tous les boutons Acheter en gris */
.btn-plan-compact {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--mwz-radius-sm);
    background: #6b7280;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-plan-compact:hover {
    background: #4b5563;
    color: white;
    transform: scale(1.02);
}

/* Bouton populaire identique */
.btn-plan-popular {
    background: #6b7280;
    color: white;
    border: none;
}

.btn-plan-popular:hover {
    background: #4b5563;
    color: white;
}

/* Responsive: TOUJOURS 3 colonnes - ajuster taille texte sur petit ecran */
@media (max-width: 360px) {
    .plans-grid-compact {
        gap: 6px;
    }
    .plan-card-compact {
        padding: 8px 4px;
    }
    .plan-icon-compact {
        font-size: 0.6875rem;
        padding: 4px 6px;
        min-width: 40px;
    }
    .plan-label {
        font-size: 0.5625rem;
    }
    .plan-price-compact {
        font-size: 0.8125rem;
    }
    .btn-plan-compact {
        font-size: 0.5625rem;
        padding: 5px 4px;
    }
}

/* Ancien style 2 colonnes (backup) */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--mwz-space-3);
}

.plan-card {
    background: var(--mwz-bg);
    border: 1px solid var(--mwz-border);
    border-radius: var(--mwz-radius-lg);
    padding: var(--mwz-space-3);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.plan-card:hover {
    border-color: var(--mwz-primary);
}

.plan-card-popular {
    border-color: var(--mwz-primary);
    background: linear-gradient(to bottom, rgba(27, 87, 142, 0.05) 0%, var(--mwz-bg) 50%);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mwz-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--mwz-radius-full);
    white-space: nowrap;
}

.plan-card-header {
    text-align: center;
    margin-bottom: var(--mwz-space-3);
    padding-bottom: var(--mwz-space-3);
    border-bottom: 1px dashed var(--mwz-border);
}

.plan-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mwz-text-primary);
    margin: 0 0 var(--mwz-space-1) 0;
}

.plan-price-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mwz-primary);
}

.plan-card-body {
    flex: 1;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--mwz-space-2) 0;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-2);
    font-size: 0.75rem;
    color: var(--mwz-text-secondary);
    margin-bottom: var(--mwz-space-1);
}

.plan-feature svg {
    flex-shrink: 0;
    color: var(--mwz-success);
}

.plan-description {
    font-size: 0.6875rem;
    color: var(--mwz-text-muted);
    margin: 0;
    line-height: 1.4;
}

.plan-card-footer {
    margin-top: var(--mwz-space-3);
}

.btn-plan {
    width: 100%;
    padding: var(--mwz-space-2);
    font-size: 0.75rem;
    font-weight: 600;
}

.plans-footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-1);
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    margin-top: var(--mwz-space-2);
    margin-bottom: 0;
    padding-bottom: 0;
    text-align: center;
}

/* Plans responsive - 1 colonne sur tres petit ecran */
@media (max-width: 400px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        flex-direction: row;
        align-items: center;
        gap: var(--mwz-space-3);
    }

    .plan-card-header {
        border-bottom: none;
        border-right: 1px dashed var(--mwz-border);
        padding-right: var(--mwz-space-3);
        padding-bottom: 0;
        margin-bottom: 0;
        min-width: 80px;
    }

    .plan-card-body {
        flex: 1;
    }

    .plan-card-footer {
        margin-top: 0;
        min-width: 70px;
    }

    .plan-badge {
        top: 50%;
        left: -10px;
        transform: translateY(-50%) rotate(-90deg);
        transform-origin: center center;
    }
}

/* ============================================================================
   MODAL CREATION COMPTE
   ============================================================================ */

.create-account-modal .modal-content {
    border-radius: var(--mwz-radius-xl);
    border: none;
}

.create-account-modal .modal-header {
    border-bottom: 1px solid var(--mwz-border);
    padding: var(--mwz-space-4);
}

.create-account-modal .modal-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--mwz-text-primary);
}

.create-account-modal .modal-title svg {
    color: var(--mwz-primary);
}

.create-account-modal .modal-body {
    padding: var(--mwz-space-4);
}

.create-account-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-2);
    margin-bottom: var(--mwz-space-4);
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--mwz-surface);
    border: 2px solid var(--mwz-border);
    color: var(--mwz-text-muted);
    transition: all 0.3s ease;
}

.step-badge.active {
    background: var(--mwz-primary);
    border-color: var(--mwz-primary);
    color: white;
}

.step-badge.completed {
    background: var(--mwz-success);
    border-color: var(--mwz-success);
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--mwz-border);
    transition: background 0.3s ease;
}

.step-line.completed {
    background: var(--mwz-success);
}

.create-account-description {
    font-size: 0.875rem;
    color: var(--mwz-text-secondary);
    text-align: center;
    margin-bottom: var(--mwz-space-4);
}

.create-account-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-1);
    font-size: 0.75rem;
    color: var(--mwz-text-muted);
    margin: var(--mwz-space-3) 0;
}

.create-account-hint svg {
    color: var(--mwz-primary);
}

/* Summary */
.create-account-summary {
    text-align: center;
    padding: var(--mwz-space-4);
    background: var(--mwz-surface);
    border-radius: var(--mwz-radius-lg);
    margin-bottom: var(--mwz-space-4);
}

.summary-icon {
    color: var(--mwz-success);
    margin-bottom: var(--mwz-space-3);
}

.summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mwz-text-primary);
    margin-bottom: var(--mwz-space-4);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--mwz-space-2) 0;
    border-bottom: 1px solid var(--mwz-border);
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-label {
    font-size: 0.8125rem;
    color: var(--mwz-text-secondary);
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mwz-text-primary);
}

.summary-code {
    font-family: monospace;
    letter-spacing: 2px;
}

.summary-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--mwz-space-2);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--mwz-radius-md);
    padding: var(--mwz-space-3);
    margin-top: var(--mwz-space-4);
    font-size: 0.75rem;
    color: var(--mwz-warning);
    text-align: left;
}

.summary-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================================
   CHECKBOX CGU PERSONNALISE - Centre avec bordure noire epaisse
   ============================================================================ */

.terms-checkbox-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.terms-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mwz-space-2);
    cursor: pointer;
    user-select: none;
}

.terms-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.terms-checkbox-custom {
    width: 22px;
    height: 22px;
    border: 3px solid #000000; /* Bordure noire epaisse */
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.terms-checkbox-input:checked + .terms-checkbox-custom {
    background: var(--mwz-primary);
    border-color: var(--mwz-primary);
}

.terms-checkbox-input:checked + .terms-checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.terms-checkbox-input:focus + .terms-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.terms-checkbox-label {
    font-size: 0.875rem;
    color: var(--mwz-text);
}

.terms-checkbox-label a {
    font-weight: 600;
}

/* Success Step */
.create-account-success {
    text-align: center;
    padding: var(--mwz-space-4) 0;
}

.success-icon {
    color: var(--mwz-success);
    margin-bottom: var(--mwz-space-3);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mwz-text-primary);
    margin-bottom: var(--mwz-space-2);
}

.success-description {
    font-size: 0.875rem;
    color: var(--mwz-text-secondary);
    margin-bottom: var(--mwz-space-4);
}

/* Bouton Create Account outline */
.btn-create-account {
    border: 2px solid var(--mwz-primary) !important;
    color: var(--mwz-primary) !important;
    background: transparent !important;
    font-weight: 600;
}

.btn-create-account:hover,
.btn-create-account:focus {
    background: var(--mwz-primary) !important;
    color: white !important;
}

/* ============================================================================
   OTP METHOD RADIO CARDS (Etape 2 - Choix canal WhatsApp/SMS)
   ============================================================================ */

.otp-method-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.otp-method-card {
    display: block;
    cursor: pointer;
    border: 2px solid var(--mwz-border);
    border-radius: var(--mwz-radius-lg);
    padding: 12px 14px;
    transition: all 0.2s ease;
    background: var(--mwz-bg-card);
}

.otp-method-card:hover:not(.disabled) {
    border-color: var(--mwz-primary);
    background: rgba(59, 130, 246, 0.04);
}

.otp-method-card.selected {
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.otp-method-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Animation flash rouge si aucune methode selectionnee */
.otp-method-card.flash-attention {
    animation: otpFlashRed 0.6s ease;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@keyframes otpFlashRed {
    0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
    50% { border-color: #ef4444; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.35); }
}

/* Input radio cache */
.otp-method-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.otp-method-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.otp-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.otp-method-icon-whatsapp {
    background: rgba(37, 211, 102, 0.12);
}

.otp-method-icon-sms {
    background: rgba(59, 130, 246, 0.12);
}

.otp-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.otp-method-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mwz-text);
}

.otp-method-badge {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

.otp-method-badge-free {
    background: rgba(37, 211, 102, 0.15);
    color: #16a34a;
}

.otp-method-badge-soon {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Icone check (visible uniquement quand selectionne) */
.otp-method-check {
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    color: #25D366;
}

.otp-method-card.selected .otp-method-check {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================================
   DASHBOARD - Espace Client
   ============================================================================ */

.dashboard-section {
    min-height: calc(100vh - 180px);
}

.dashboard-card {
    background: var(--mwz-bg-card);
    border-radius: var(--mwz-radius-xl);
    padding: var(--mwz-space-5);
    box-shadow: var(--mwz-shadow-lg);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mwz-space-4);
}

.dashboard-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mwz-text);
    margin: 0;
}

.dashboard-subtitle {
    font-size: 0.8125rem;
    color: var(--mwz-text-muted);
    margin: var(--mwz-space-1) 0 0;
}

.dashboard-status {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-2);
    padding: var(--mwz-space-2) var(--mwz-space-3);
    border-radius: var(--mwz-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.dashboard-status.connected {
    background: var(--mwz-success-light);
    color: var(--mwz-success);
}

.dashboard-status.connected svg {
    fill: var(--mwz-success);
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: var(--mwz-space-3);
    padding: var(--mwz-space-3);
    background: var(--mwz-border-light);
    border-radius: var(--mwz-radius-lg);
    margin-bottom: var(--mwz-space-4);
}

.dashboard-user svg {
    fill: var(--mwz-text-muted);
}

.dashboard-user .user-label {
    font-size: 0.6875rem;
    color: var(--mwz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.dashboard-user .user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mwz-text);
    margin: 0;
}

.dashboard-stats {
    display: flex;
    flex-direction: column;
    gap: var(--mwz-space-3);
}

.dashboard-stats .stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--mwz-space-1);
}

.dashboard-stats .stat-bar {
    height: 4px;
    border-radius: 2px;
    width: 100%;
}

.dashboard-stats .stat-bar.purple { background: linear-gradient(90deg, #667eea, #764ba2); }
.dashboard-stats .stat-bar.blue { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.dashboard-stats .stat-bar.green { background: linear-gradient(90deg, #11998e, #38ef7d); }
.dashboard-stats .stat-bar.orange { background: linear-gradient(90deg, #fc4a1a, #f7b733); }

.dashboard-stats .stat-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mwz-text);
    margin: 0;
}

.dashboard-stats .stat-label {
    font-size: 0.6875rem;
    color: var(--mwz-text-muted);
    margin: 0;
}

/* Login Form in Dashboard */
.login-form .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mwz-text);
    margin-bottom: var(--mwz-space-2);
}

.login-form .input-group-text {
    background: var(--mwz-border-light);
    border: 1px solid var(--mwz-border);
    border-right: none;
}

.login-form .form-control {
    border: 1px solid var(--mwz-border);
    border-radius: var(--mwz-radius-md);
}

.login-form .input-group .form-control {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
