/* ============================================================
   INFO-DEVIS.FR — Layout : Header, Nav, Footer, Mobile
   ============================================================ */

/* ---- HEADER ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--header-h);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow var(--t-mid);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

/* Logo - CORRIGÉ: pas d'espace */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: var(--fs-xl);
    color: var(--navy);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.logo-badge {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--fs-sm);
    font-weight: 800;
    letter-spacing: -0.5px;
    box-shadow: 0 3px 10px rgba(37,99,168,0.35);
}
.logo-text-main { 
    color: var(--navy); 
    background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation desktop */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav-link {
    position: relative;
    padding: 8px 14px;
    font-weight: 500;
    font-size: var(--fs-sm);
    color: var(--gray-600);
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    cursor: pointer;
}
.nav-link:hover { color: var(--blue); background: var(--gray-100); }
.nav-link.active { color: var(--blue); font-weight: 600; }

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ---- USER DROPDOWN ---- */
.user-menu-wrapper { position: relative; }

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
    color: white;
    border: none;
    border-radius: var(--r-full);
    padding: 8px 16px 8px 8px;
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all var(--t-mid) var(--ease);
    box-shadow: 0 2px 8px rgba(37,99,168,0.25);
}
.user-avatar-btn:hover, .user-avatar-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,168,0.35);
}
.user-avatar-initials {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}
.user-avatar-chevron {
    font-size: 0.65rem;
    opacity: 0.8;
    transition: transform var(--t-fast);
}
.user-avatar-btn.active .user-avatar-chevron { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 248px;
    background: var(--white);
    border-radius: var(--r-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all var(--t-mid) var(--ease);
    z-index: 999;
    overflow: hidden;
}
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 14px;
    background: linear-gradient(135deg, #f0f7ff, #e6f8f6);
    border-bottom: 1px solid var(--gray-100);
}
.user-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: var(--fs-sm);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,168,0.25);
}
.user-dropdown-name {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-dropdown-email {
    font-size: var(--fs-xs);
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: var(--fs-sm);
    color: var(--gray-700);
    cursor: pointer;
    transition: background var(--t-fast);
}
.user-dropdown-item:hover { background: var(--gray-50); color: var(--blue); }
.user-dropdown-icon { font-size: 1rem; width: 20px; text-align: center; }
.user-dropdown-logout { color: var(--error) !important; margin-bottom: 4px; }
.user-dropdown-logout:hover { background: #fff5f5 !important; }

/* ---- MOBILE TOGGLE - HAMBURGER ---- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--r-md);
    transition: background var(--t-fast);
}
.mobile-menu-toggle:hover {
    background: var(--gray-100);
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--t-mid);
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- MOBILE NAV ---- */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 800;
    padding: 16px;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.mobile-nav.active {
    display: flex;
}
.mobile-nav .nav-link {
    padding: 16px 20px;
    font-size: var(--fs-base);
    border-radius: var(--r-lg);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}
.mobile-nav .nav-link:hover {
    background: var(--gray-50);
}
.mobile-nav-sep {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}
.mobile-nav-cta {
    background: linear-gradient(135deg, var(--amber), var(--amber-light)) !important;
    color: white !important;
    font-weight: 700 !important;
    margin-top: 8px;
}

/* ---- FOOTER ---- */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.75);
    padding: 72px 0 28px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 28px;
}
.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand .logo-text-main {
    background: none !important;
    -webkit-text-fill-color: white !important;
    color: white !important;
}
.footer-brand-desc {
    font-size: var(--fs-sm);
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
    max-width: 280px;
}
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.footer-social-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Active/Click state - same as hover but with scale */
.footer-social-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}
.footer-col-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: white;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}
.footer-col-links li { margin-bottom: 10px; }
.footer-col-links a {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.55);
    transition: color var(--t-fast);
    cursor: pointer;
}
.footer-col-links a:hover { color: white; }
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.55);
}
.footer-contact-item span { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.35);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.35); cursor: pointer; transition: color var(--t-fast); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   RESPONSIVE - MEDIA QUERIES
   ============================================================ */

/* Tablette */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Mobile - Tablette */
@media (max-width: 768px) {
    /* Header */
    .nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .header-actions .btn-ghost { display: none; }
    
    /* Trust Bar - COLONNES */
    .trust-bar-inner {
        flex-direction: column;
        gap: 16px;
    }
    .trust-item {
        font-size: var(--fs-xs);
    }
    
    /* Categories - 2 COLONNES sur tablette */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile - Petit écran */
@media (max-width: 480px) {
    :root { 
        --pad: 16px;
        --header-h: 64px;
    }
    
    .logo {
        font-size: var(--fs-lg);
    }
    .logo-badge {
        width: 32px;
        height: 32px;
        font-size: var(--fs-xs);
    }
    
    /* Categories - 1 COLONNE sur mobile */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* Steps - VERTICAL sur mobile */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .steps-connector {
        display: none;
    }
    
    /* Testimonials - 1 COLONNE */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 28px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { 
        flex-direction: column; 
        gap: 12px; 
        text-align: center; 
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: var(--fs-base);
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Hero Stats */
    .hero-stats {
        flex-direction: column;
        gap: 16px;
        padding-top: 24px;
    }
    .hero-stat {
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 16px 0;
    }
    .hero-stat:last-child {
        border-bottom: none;
    }
    .hero-stat-value {
        font-size: var(--fs-2xl);
    }
}
