/* =============================================================================
   Design System Premium - Pretisys
   Vanilla CSS Structuré, Moderne et Responsive (Aesthétiques Light Mode & Glassmorphism)
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #f8fafc; /* Slate 50 - Blanc cassé élégant */
    --bg-card: rgba(255, 255, 255, 0.85); /* Blanc semi-transparent */
    --bg-navbar: rgba(255, 255, 255, 0.9);
    
    --primary: #2563eb; /* Royal Blue 600 */
    --primary-hover: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    
    --secondary: #6d28d9; /* Violet 700 */
    --secondary-gradient: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);

    --success: #059669; /* Green 600 */
    --success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    
    --danger: #e11d48; /* Rose 600 */
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --border-color: rgba(15, 23, 42, 0.08); /* Bordure sombre très fine */
    --border-focus: rgba(37, 99, 235, 0.4);
    
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

/* =============================================================================
   Composants de Navigation (Navbar)
   ============================================================================= */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.lang-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}

.lang-btn.active, .lang-btn:hover {
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 600;
    border-color: transparent;
}

/* =============================================================================
   Mise en Page Globale
   ============================================================================= */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.7);
}

/* =============================================================================
   Panneaux en Verre (Glassmorphism)
   ============================================================================= */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.06);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* =============================================================================
   Formulaires (Champs de saisie & Boutons)
   ============================================================================= */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-focus);
    background: rgba(255, 255, 255, 1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

select.form-control option {
    background-color: #ffffff;
    color: var(--text-main);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

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

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =============================================================================
   Alertes et Messages de statut
   ============================================================================= */
.alerts-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto 1.5rem auto;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.15);
    color: #b91c1c;
}

.alert-success {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.15);
    color: #047857;
}

/* =============================================================================
   Tableau de bord / Profil Espace Client
   ============================================================================= */
.profile-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
}

.dashboard-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.dashboard-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-main);
}

.dashboard-header p {
    color: var(--text-muted);
}

.balances-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.balance-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.balance-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.balance-value.invested {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-val {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

/* =============================================================================
   Header Modernisé (Inspiré de la maquette)
   ============================================================================= */
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Navbar Links wrapper */
.navbar-menu {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.navbar-nav {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Button CTA Devenir Client styled like the mockup */
.btn-cta {
    background: #0284c7; /* Sky 600 - Bleu vif */
    color: #ffffff !important;
    padding: 0.65rem 1.5rem;
    border-radius: 50px; /* Complètement arrondi */
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
    transition: var(--transition);
}

.btn-cta:hover {
    background: #0369a1; /* Sky 700 */
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
    text-shadow: none !important;
}

/* Globe indicator selection */
.lang-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
}

.lang-selector svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 10;
    min-width: 80px;
    overflow: hidden;
}

.lang-selector:hover .lang-dropdown-menu {
    display: block;
}

.lang-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.lang-dropdown-item:hover, .lang-dropdown-item.active {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

/* Hamburger menu button for Mobile */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-main);
    z-index: 101;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin-bottom: 5px;
    transition: var(--transition);
}

.navbar-toggle span:last-child {
    margin-bottom: 0;
}

/* Responsive Navbar */
@media (max-width: 992px) {
    .navbar-toggle {
        display: block;
    }
    
    .navbar-menu {
        display: none; /* Cache par défaut sur mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 16px rgba(0,0,0,0.05);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1.25rem;
        align-items: stretch;
        z-index: 99;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        width: 100%;
    }
    
    .navbar-nav li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 0.5rem 0;
        width: 100%;
    }
    
    .btn-cta {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* =============================================================================
   Footer Sombre Premium (Inspiré de la maquette)
   ============================================================================= */
footer {
    background: #0b0f19 !important; /* Très sombre */
    color: #94a3b8 !important; /* Gris moyen */
    padding: 4rem 2rem 2rem 2rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: left;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.3px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #94a3b8 !important;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff !important;
    padding-left: 4px;
    text-shadow: none !important;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #64748b !important;
}

.footer-bottom-links a:hover {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================================================
   Composant FAQ Accordéon
   ============================================================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: var(--transition);
    color: var(--primary);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding-bottom: 1.25rem;
}

/* =============================================================================
   Composants et Layouts Page Contact
   ============================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* =============================================================================
   Nouvelles Sections Premium Page d'Accueil
   ============================================================================= */
.premium-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.08) !important;
}

/* =============================================================================
   Responsive Hero Section (Vitrine)
   ============================================================================= */
.hero-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    margin-bottom: 5rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2.2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-main) 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    width: auto;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-btn-secondary {
    width: auto;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    background: rgba(15,23,42,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--transition);
}

.hero-btn-secondary:hover {
    background: rgba(15,23,42,0.06);
    color: var(--text-main);
}

.hero-illustration {
    text-align: center;
    position: relative;
}

.hero-illustration img {
    width: 100%;
    max-width: 460px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);
    transition: var(--transition);
}

.hero-illustration img:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.1);
}

@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding: 1.5rem 0;
        margin-bottom: 3.5rem;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.25rem;
        letter-spacing: -1.2px;
        line-height: 1.2;
    }

    .hero-desc {
        font-size: 1.05rem;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .hero-ctas {
        justify-content: center;
        width: 100%;
    }

    .hero-btn, .hero-btn-secondary {
        width: 100%;
        max-width: 320px;
    }
}
