/* ===================== RESET DE BASE ===================== */
*{margin:0;padding:0;box-sizing:border-box;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif}
body{background:#0a0a0a;color:#f0f0f5;line-height:1.6}
a{color:inherit;text-decoration:none}
button{cursor:pointer;border:none;outline:none}

/* ===================== CONTAINERS ===================== */
.container{width:90%;max-width:1200px;margin:auto}

/* ===================== HEADER ===================== */
.header{background:linear-gradient(90deg,#0a0a0a,#1a1a1a);padding:1rem 0;box-shadow:0 2px 8px rgba(0,0,0,0.8);position:sticky;top:0;z-index:1000}
.header-container{display:flex;justify-content:space-between;align-items:center}
.logo{font-size:1.8rem;font-weight:bold;color:var(--primary-color)}
.logo .brand{color:var(--primary-color)}
.logo .brand-pass{margin-left:0.25rem;color:#fff}
.nav-right{display:flex;align-items:center;gap:1rem}

/* ===================== BOUTONS HEADER ===================== */
.btn-gold-top,.theme-btn{padding:0.6rem 1.2rem;border-radius:12px;font-size:1rem;font-weight:600;transition:all 0.3s ease-in-out}
.btn-gold-top{background:var(--gold-bg);color:#fff;box-shadow:0 0 8px rgba(251,191,36,0.5),0 0 16px rgba(245,158,11,0.3)}
.btn-gold-top:hover{transform:scale(1.01);box-shadow:0 0 12px rgba(251,191,36,0.7),0 0 24px rgba(245,158,11,0.4)}
.theme-btn{background:transparent;color:var(--primary-color);font-weight:bold;display:flex;align-items:center;gap:0.4rem}
.theme-btn:hover{color:#fff;transform:scale(1.01)}

/* ===================== PROMO BANNER ===================== */
.promo-banner{background:#1a1a1a;text-align:center;padding:1rem;font-size:1rem;color:var(--primary-color);font-weight:500;box-shadow:0 2px 6px rgba(0,0,0,0.8)}
/* ===================== GENERATOR ===================== */
.generator-container{background:#151515;padding:2rem;border-radius:16px;margin:2rem 0;box-shadow:0 4px 15px rgba(0,0,0,0.8);display:flex;flex-direction:column}

.generator-container h2{font-size:1.8rem;margin-bottom:1rem;color:var(--primary-color)}

/* ===================== TYPE DE MOT DE PASSE ===================== */
.password-type{display:flex;gap:2rem;margin-bottom:1.5rem;justify-content:flex-start}

.type-toggle{position:relative;display:flex;align-items:center;cursor:pointer;padding:0.8rem 1.2rem;border-radius:12px;background:#0f0f0f;border:2px solid transparent;transition:all 0.3s ease;font-weight:600;text-transform:uppercase;letter-spacing:0.5px}

.type-toggle:hover{background:#1a1a1a;border-color:var(--primary-color);transform:translateY(-2px);box-shadow:0 4px 12px rgba(139,92,246,0.3)}

.type-toggle input[type="radio"]{position:absolute;opacity:0;width:0;height:0}

.type-toggle input[type="radio"]:checked + .toggle-content{color:var(--primary-color)}
.type-toggle input[type="radio"]:checked ~ *{color:var(--primary-color)}
.type-toggle input[type="radio"]:checked{border-color:var(--primary-color);box-shadow:0 0 0 2px rgba(139,92,246,0.3)}
.type-toggle:has(input[type="radio"]:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px rgba(139,92,246,0.3)}

.toggle-content{display:flex;align-items:center;gap:0.5rem;color:#b8bcc8;transition:color 0.3s ease}

.toggle-icon{font-size:1.2rem}
.toggle-text{font-size:0.9rem;font-weight:700}

.generator-options{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}

/* Options pour passe de phrase - garder en bas */
#passphrase-options{flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}

.generator-options label{display:flex;align-items:center;gap:0.4rem;font-size:0.9rem;color:#f0f0f5}

/* Cases à cocher pour les options */
.generator-options label.option-toggle{display:flex;align-items:center;gap:0.5rem;cursor:pointer;padding:0.8rem 1rem;border-radius:8px;background:#0f0f0f;border:1px solid #3a3f52;transition:all 0.3s ease;font-weight:500;text-transform:uppercase;letter-spacing:0.5px}

.generator-options label.option-toggle:hover{background:#1a1a1a;border-color:var(--primary-color)}

.generator-options label.option-toggle input[type="checkbox"]{width:18px;height:18px;accent-color:var(--primary-color);cursor:pointer}

.generator-options label.option-toggle input[type="checkbox"]:checked + .toggle-content{color:var(--primary-color)}
.generator-options label.option-toggle input[type="checkbox"]:checked ~ *{color:var(--primary-color)}

/* Contrôle de longueur (slider) */
.length-control{display:flex;align-items:center;gap:0.5rem;padding:10px 0}
.length-control input[type="range"]{width:280px;height:12px;accent-color:var(--primary-color);background:transparent;outline:none;-webkit-appearance:none;appearance:none}
.length-control input[type="range"]::-webkit-slider-runnable-track{background:#6b7280;border-radius:12px;height:12px;position:relative}
.length-control input[type="range"]::-moz-range-track{background:#6b7280;border-radius:12px;height:12px;border:none}
.length-control input[type="range"]::-webkit-slider-thumb{background:var(--primary-color);border-radius:50%;width:24px;height:24px;border:3px solid #fff;cursor:pointer;-webkit-appearance:none;appearance:none;margin-top:-6px;box-shadow:0 2px 6px rgba(0,0,0,0.2);transition:all 0.2s ease}
.length-control input[type="range"]::-webkit-slider-thumb:hover{background:#ff6b6b;transform:scale(1.1);box-shadow:0 4px 12px rgba(0,0,0,0.3)}
.length-control input[type="range"]::-webkit-slider-thumb:active{background:#ff6b6b;transform:scale(1.2);box-shadow:0 6px 16px rgba(0,0,0,0.4)}
.length-control input[type="range"]::-moz-range-thumb{background:var(--primary-color);border-radius:50%;width:24px;height:24px;border:3px solid #fff;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,0.2);transition:all 0.2s ease}
.length-control input[type="range"]::-moz-range-thumb:hover{background:#ff6b6b;transform:scale(1.1);box-shadow:0 4px 12px rgba(0,0,0,0.3)}
.length-control input[type="range"]::-moz-range-thumb:active{background:#ff6b6b;transform:scale(1.2);box-shadow:0 6px 16px rgba(0,0,0,0.4)}
.length-control input[type="range"]:focus{outline:none}
.length-control input[type="range"]:focus::-webkit-slider-thumb{box-shadow:0 0 0 4px rgba(255,107,107,0.2)}
.length-control input[type="range"]:focus::-moz-range-thumb{box-shadow:0 0 0 4px rgba(255,107,107,0.2)}

/* Mode sombre pour la barre de longueur */
body.theme-dark .length-control input[type="range"]::-webkit-slider-runnable-track{background:#fff}
body.theme-dark .length-control input[type="range"]::-moz-range-track{background:#fff}
/* Mode clair pour la barre de longueur */
body.theme-light .length-control input[type="range"]::-webkit-slider-runnable-track{background:#6b7280}
body.theme-light .length-control input[type="range"]::-moz-range-track{background:#6b7280}
.length-control #passwordLengthValue,.length-control #passphraseLengthValue{display:inline-block;min-width:3ch;text-align:center;font-weight:bold;color:var(--text-color)}

/* Boutons de contrôle de longueur */
.length-btn{background:var(--primary-color);color:#fff;border:none;border-radius:50%;width:28px;height:28px;font-size:16px;font-weight:bold;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease;margin-left:4px}

.length-btn:hover{background:var(--secondary-color);transform:scale(1.1)}

.length-btn:active{transform:scale(0.95)}

/* Mode sombre pour les boutons */
body.theme-dark .length-btn{background:var(--primary-color)}

body.theme-dark .length-btn:hover{background:var(--secondary-color)}

/* ===================== BARRE MOT DE PASSE ===================== */
.password-wrapper{display:flex;align-items:center;margin-bottom:1rem;gap:0.5rem;position:relative}

#password-output{flex:1;padding:0.8rem 1rem;border-radius:12px;border:none;background:#0f0f0f;color:#fff;font-size:1rem;min-height:20px;line-height:1.2;word-break:break-all;font-family:monospace}

/* Style pour le placeholder du div de mot de passe */
.password-display:empty::before{content:attr(data-placeholder);color:#666;font-style:italic}

/* Styles pour les caractères colorés */
.char-uppercase{color:#ff69b4!important;font-weight:bold;display:inline}

.char-number{color:#00bfff!important;font-weight:bold;display:inline}

.char-symbol{color:#ff0000!important;font-weight:bold;display:inline}

#copy-btn{padding:0.8rem 1rem;border-radius:12px;background:var(--btn-bg);color:#fff;font-weight:bold;transition:all 0.3s ease-in-out}

#copy-btn:hover{transform:scale(1.01);box-shadow:0 0 3px var(--primary-color)}

/* ===================== FORCE MOT DE PASSE ===================== */
.password-strength{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}

.strength-bar{flex:1;height:12px;background:#0f0f0f;border-radius:8px;overflow:hidden}

.strength-fill{width:0%;height:100%;background:var(--primary-color);transition:width 0.3s ease,background 0.3s ease}

.strength-text{font-size:0.9rem;font-weight:bold;color:var(--primary-color)}

/* ===================== BOUTONS GENERER ===================== */
.generator-buttons{display:flex;gap:1rem;margin-bottom:1rem}

.btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: var(--btn-bg);
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.01);
    box-shadow: 0 0 2px var(--primary-color);
}

.btn-gold {
    background: var(--gold-bg);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5), 0 0 16px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.7), 0 0 24px rgba(245, 158, 11, 0.4);
}

/* ===================== BARRE MOT DE PASSE ===================== */
.password-display-area {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    position: relative;
}

.password-text {
    flex: 1;
    padding: 0.8rem 1rem;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    position: relative;
}

.password-text:empty::before {
    content: attr(data-placeholder);
    color: #666;
    font-style: italic;
}

.btn-copy {
    padding: 0.8rem 1.5rem;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-copy:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-copy.active {
    background: #4CAF50;
    transform: scale(1.05);
}

/* ===================== ASTUCES ===================== */
.generator-tips p {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 0.5rem;
}
/* ===================== HISTORIQUE ===================== */
.history-container {
    background: #151515;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.history-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #c77dff;
}

.history-list {
    max-height: 300px;
    overflow: auto;
    padding-right: 0.25rem;
}

.password-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    background: #0f0f0f;
    border-radius: 12px;
    font-family: monospace;
}

.password-item:hover {
    background: #1a1a1a;
}

/* Scrollbar styling */
.history-list::-webkit-scrollbar { height: 8px; width: 8px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb { background: #555; border-radius: 8px; }
.history-list:hover::-webkit-scrollbar-thumb { background: #777; }

/* Notes icon */
.password-item .notes-icon {
    margin-left: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.password-item .notes-icon:hover {
    color: var(--primary-color);
}

.password-item .notes-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Copy icon */
.password-item .copy-icon {
    margin-left: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.password-item .copy-icon:hover {
    color: var(--primary-color);
}

.password-item .copy-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Icon color by theme */
body.theme-dark .password-item .copy-icon,
body.theme-dark .password-item .notes-icon { color: #ffffff; }
body.theme-light .password-item .copy-icon,
body.theme-light .password-item .notes-icon { color: #000000; }

/* ===================== PREMIUM ===================== */
.premium-container {
    background: #151515;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.premium-container h2 {
    color: #c77dff;
    margin-bottom: 1rem;
}

.premium-features {
    list-style: none;
    padding-left: 0;
}

.premium-features li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #f0f0f5;
    position: relative;
    padding-left: 1.5rem;
}

.premium-features li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #c77dff;
}

/* ===================== FAQ ===================== */
.faq-container {
    background: #151515;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.faq-container h2 {
    color: #c77dff;
    margin-bottom: 1rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-item h3 {
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-item h3:hover {
    color: #c77dff;
}

.faq-item p {
    color: #ccc;
    margin-top: 0.3rem;
}

/* ===================== CONTACT ===================== */
.contact-container {
    background: #151515;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.contact-container h2 {
    color: #c77dff;
    margin-bottom: 1rem;
}

.contact-container form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.contact-container form input,
.contact-container form textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: none;
    background: #1f1f3a;
    color: #fff;
    resize: none;
}

.contact-container form button {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--btn-bg);
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
}

.contact-container form button:hover {
    transform: scale(1.01);
    box-shadow: 0 0 3px var(--primary-color);
}

/* ===================== FOOTER ===================== */
.footer {
    background: #0a0a0a;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    margin: 0 0.5rem;
    color: #c77dff;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

/* ===================== NOTIFICATIONS ===================== */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #c77dff, #e0aaff);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}

.notification.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-10px);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .password-type {
        flex-direction: column;
        gap: 1rem;
    }
    .generator-options {
        flex-direction: column;
    }
    .generator-buttons {
        flex-direction: column;
    }
    .nav-right {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .password-display-area {
        flex-direction: column;
    }
    #copy-btn {
        width: 100%;
    }
    .theme-btn, .btn-gold-top {
        width: 100%;
        text-align: center;
    }
}
/* ===================== THEME DYNAMIQUE ===================== */

/* Variables par défaut (sombre + violet-rose) */
:root {
    --bg-color: #0a0a0a;
    --container-bg: #151515;
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --text-color: #f0f0f5;
    --btn-bg: linear-gradient(135deg, #8b5cf6, #a855f7, #9333ea);
    --gold-bg: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
}

/* Thème sombre */
body.theme-dark {
    --bg-color: #0a0a0a;
    --container-bg: #151515;
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --text-color: #f0f0f5;
    --btn-bg: linear-gradient(135deg, #8b5cf6, #a855f7, #9333ea);
    --gold-bg: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
}

/* Thème clair */
body.theme-light {
    --bg-color: #f8f8f8;
    --container-bg: #eaeaea;
    --primary-color: #7c3aed; /* violet plus foncé */
    --secondary-color: #8b5cf6; /* violet plus foncé */
    --text-color: #000000;
    --btn-bg: linear-gradient(135deg, #7c3aed, #8b5cf6, #6d28d9);
    --gold-bg: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
}

/* Contour rose pour les boutons sélectionnés en thème clair */
body.theme-light .type-toggle:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(176, 18, 77, 0.3);
}

/* Application des variables */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.generator-container,
.history-container,
.premium-container,
.faq-container,
.contact-container {
    background-color: var(--container-bg);
    color: var(--text-color);
}

/* Boutons Gold et Thème */
.theme-btn,
#copy-btn {
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.8rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.theme-btn:hover,
#copy-btn:hover {
    transform: scale(1.01);
    box-shadow: 0 0 3px var(--primary-color);
}

/* ===================== LIGHT THEME OVERRIDES ===================== */
body.theme-light .header {
    background: linear-gradient(90deg, #ffffff, #f3f3f7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body.theme-light .promo-banner {
    background: #f0f0f5;
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

body.theme-light #password-output {
    background: #ffffff;
    color: #000000;
    border: 1px solid #dddddd;
}

body.theme-light .generator-options label.option-toggle {
    background: #ffffff;
    color: #000000;
    border: 1px solid #dddddd;
}

body.theme-light .strength-bar {
    background: #e6e6eb;
}

body.theme-light .password-item {
    background: #ffffff;
    color: #000000;
    border: 1px solid #e9e9ee;
}
body.theme-light .password-item:hover {
    background: #f7f7fb;
}

/* ===================== OPTIONS D'ACCESSIBILITÉ ===================== */
.high-contrast {
    --primary-color: #ffffff;
    --secondary-color: #000000;
    --accent-color: #ffff00;
    --text-color: #ffffff;
    --bg-color: #000000;
}

.high-contrast * {
    color: var(--text-color) !important;
    background-color: var(--bg-color) !important;
    border-color: var(--accent-color) !important;
}

.large-text {
    font-size: 1.2em;
}

.large-text h1, .large-text h2, .large-text h3 {
    font-size: 1.5em;
}

.large-text button, .large-text input, .large-text select {
    font-size: 1.1em;
    padding: 0.8rem 1.2rem;
}

.reduced-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.reduced-motion .btn:hover {
    transform: none !important;
}

.reduced-motion .type-toggle:hover,
.reduced-motion .option-toggle:hover,
.reduced-motion .language-option:hover {
    transform: none !important;
}

body.theme-light .contact-container form input,
body.theme-light .contact-container form textarea {
    background: #ffffff;
    color: #000000;
    border: 1px solid #dddddd;
}

body.theme-light .footer {
    background: #f0f0f5;
    color: #000000;
}

/* Titres et liens accentués en thème clair */
body.theme-light .logo,
body.theme-light .generator-container h2,
body.theme-light .history-container h2,
body.theme-light .premium-container h2,
body.theme-light .faq-container h2,
body.theme-light .contact-container h2,
body.theme-light .history-toggle,
body.theme-light .strength-text,
body.theme-light .footer-links a {
    color: var(--primary-color);
}

/* Couleur du "Pass" en fonction du thème */
body.theme-dark .logo .brand-pass { color: #ffffff; }
body.theme-light .logo .brand-pass { color: #000000; }

/* Texte courant en noir pour une meilleure lisibilité en thème clair */
body.theme-light p,
body.theme-light li,
body.theme-light label,
body.theme-light .generator-tips p,
body.theme-light .faq-item p,
body.theme-light .premium-features li {
    color: #000000;
}

/* FAQ questions in light theme: black default, primary on hover */
body.theme-light .faq-item h3 {
    color: #000000;
}
body.theme-light .faq-item h3:hover {
    color: var(--primary-color);
}

/* Gold features bullets become arrows with dark primary color in light theme */
body.theme-light .premium-features li::before {
    content: "➤";
    color: var(--primary-color);
}

/* ===================== AUTH GOOGLE ===================== */
.auth-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.auth-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-signout {
    padding: 6px 10px;
}

/* ===================== MODALE AUTH ===================== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
    overflow-y: auto;
}
.modal.show { display: block; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10001;
}
.modal-dialog {
    position: relative;
    max-width: 420px;
    margin: 6vh auto;
    background: var(--card-bg, #0f0f0f);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    padding: 22px 22px 26px;
    outline: none;
    z-index: 10002;
}

.modal-dialog:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
body.theme-light .modal-dialog { background: #ffffff; }
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    color: inherit;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10003;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* Correction pour éviter que la croix soit sur la barre de défilement */
.modal-dialog {
    position: relative;
    padding-top: 60px; /* Espace pour la croix */
}

.modal-dialog .modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10004;
}
.auth-tabs { display: flex; gap: 10px; margin: 10px 0 18px; }
.auth-tab {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 999px;
    cursor: pointer;
}
.auth-tab.active {
    background: var(--primary-color);
    color: #000000;
}
.auth-panels {
    display: flex;
    flex-direction: column;
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form label { font-weight: 600; }
.auth-form input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #333849;
    background: #0f1320;
    color: #ffffff;
}
body.theme-light .auth-form input {
    background: #ffffff;
    color: #000000;
    border: 1px solid #dcdce0;
}
.auth-form .btn-primary {
    padding: 10px 14px;
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.auth-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: #8a8fa3;
}
.auth-separator::before, .auth-separator::after {
    content: "";
    height: 1px;
    background: #2a2f42;
    flex: 1;
}
body.theme-light .auth-separator { color: #666; }
body.theme-light .auth-separator::before,
body.theme-light .auth-separator::after { background: #e5e5ea; }
.auth-note { font-size: 12px; color: #8a8fa3; margin-top: 6px; }

/* ===================== BOUTONS SOCIAUX ===================== */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-height: 48px;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Bouton Apple */
.apple-btn {
    background: #000000;
    color: #ffffff;
    border-color: #333333;
}

.apple-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Bouton Facebook */
.facebook-btn {
    background: #1877f2;
    color: #ffffff;
    border-color: #166fe5;
}

.facebook-btn:hover {
    background: #166fe5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

/* Styles pour le thème clair */
body.theme-light .apple-btn {
    background: #000000;
    color: #ffffff;
}

body.theme-light .apple-btn:hover {
    background: #1a1a1a;
}

body.theme-light .facebook-btn {
    background: #1877f2;
    color: #ffffff;
}

body.theme-light .facebook-btn:hover {
    background: #166fe5;
}

/* Ajustement pour le bouton Google existant */
#gsi-button-modal {
    width: 100%;
}

#gsi-button-modal iframe {
    width: 100% !important;
    min-height: 48px !important;
}

/* ===================== MODALE HISTORIQUE COMPLET ===================== */
.history-full-list {
    max-height: 60vh;
    overflow-y: auto;
}

.history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.history-filters .filter-btn {
    background: #2a2f42;
    color: #b8bcc8;
    border: 1px solid #3a3f52;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-filters .filter-btn.active,
.history-filters .filter-btn:hover {
    background: #ffd700;
    color: #000000;
    border-color: #ffd700;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #2a2f42;
    border-radius: 12px;
    border: 1px solid #3a3f52;
}

.history-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-password {
    font-family: monospace;
    font-size: 0.9rem;
    color: #ffffff;
    word-break: break-all;
}

.history-type {
    font-size: 0.8rem;
    color: #8a8fa3;
    text-transform: uppercase;
    font-weight: 500;
}

.history-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.copy-history-btn,
.delete-history-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.copy-history-btn {
    background: #3b82f6;
    color: white;
}

.copy-history-btn:hover {
    background: #2563eb;
}

.delete-history-btn {
    background: #ef4444;
    color: white;
}

.delete-history-btn:hover {
    background: #dc2626;
}

/* ===================== MODALE TEST DE SÉCURITÉ ===================== */
.security-test-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.password-input-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.password-input-section label {
    color: #b8bcc8;
    font-weight: 500;
}

.password-input-section input {
    background: #2a2f42;
    border: 1px solid #3a3f52;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.password-input-section input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.security-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.score-section,
.crack-time-section,
.feedback-section {
    background: #2a2f42;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #3a3f52;
}

.score-section h3,
.crack-time-section h3,
.feedback-section h3 {
    color: #ffffff;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.score-bar {
    background: #1f1f3a;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.score-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.score-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
}

.crack-time {
    color: #ffd700;
    font-weight: 600;
    font-size: 1.1rem;
}

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

.feedback-list li {
    color: #b8bcc8;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3a3f52;
    font-size: 0.9rem;
}

.feedback-list li:last-child {
    border-bottom: none;
}

/* ===================== MODALE NOTES ===================== */
.notes-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.password-display label {
    color: #b8bcc8;
    font-weight: 500;
}

.password-display input {
    background: #2a2f42;
    border: 1px solid #3a3f52;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
}

.note-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.note-input label {
    color: #b8bcc8;
    font-weight: 500;
}

.note-input input {
    background: #2a2f42;
    border: 1px solid #3a3f52;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.note-input input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.notes-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ===================== MODALE AIDE ===================== */
.help-content {
    max-height: 60vh;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #3a3f52;
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.help-section p {
    color: #b8bcc8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.help-section ul,
.help-section ol {
    color: #b8bcc8;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.help-section li {
    margin-bottom: 0.5rem;
}

/* ===================== MODALE LANGUE ===================== */
.language-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.language-selection .language-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #2a2f42;
    border: 1px solid #3a3f52;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-selection .language-option:hover {
    background: #3a3f52;
    border-color: #c77dff;
    transform: translateY(-1px);
}

.language-selection .language-option.selected {
    background: #4a4f62;
    border-color: #c77dff;
    box-shadow: 0 0 0 2px rgba(255, 121, 198, 0.3);
}

.language-flag {
    font-size: 1.5rem;
}

.language-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Mode clair pour la modale langue */
body.theme-light .language-selection .language-option {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #000000;
}

body.theme-light .language-selection .language-option:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
}

body.theme-light .language-selection .language-option.selected {
    background: #f1f5f9;
    border-color: var(--primary-color);
}

body.theme-light .language-text {
    color: #000000;
}

/* ===================== MODALE PARAMÈTRES ===================== */
.settings-modal-dialog {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    margin: 2rem auto;
    background: #1e1e2e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.settings-container {
    display: flex;
    height: calc(90vh - 4rem);
    min-height: 600px;
}

.settings-header {
    display: none; /* Masqué sur mobile, affiché sur desktop */
    padding: 2rem;
    background: linear-gradient(135deg, #2d2d44, #1a1a2e);
    border-bottom: 1px solid #2a2f42;
}

.settings-subtitle {
    color: #8a8fa3;
    margin-top: 0.5rem;
}

/* Navigation latérale */
.settings-navigation {
    width: 280px;
    background: #2a2f42;
    border-right: 1px solid #3a3f52;
    overflow-y: auto;
}

.settings-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 24px;
    background: none;
    border: none;
    color: #b8bcc8;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: #3a3f52;
    color: #ffffff;
}

.nav-item.active {
    background: #4a4f62;
    color: #ffffff;
    border-right: 3px solid #ffd700;
}

.nav-item.danger {
    margin-top: 2rem;
    padding-top: 16px;
    border-top: 1px solid #3a3f52;
}

.nav-item.danger:hover {
    background: #4a1a1a;
    color: #ff6b6b;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

/* Contenu principal */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #1e1e2e;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #8a8fa3;
    font-size: 0.9rem;
}

/* ===================== SECTION PROFIL ===================== */
.profile-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.avatar-container {
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    margin-bottom: 1rem;
    object-fit: cover;
}

.avatar-change-btn {
    background: #2a2f42;
    color: #ffffff;
    border: 1px solid #3a3f52;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-change-btn:hover {
    background: #3a3f52;
    border-color: #4a4f62;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #b8bcc8;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    background: #2a2f42;
    border: 1px solid #3a3f52;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.password-section {
    background: #2a2f42;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.password-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===================== SECTION PRÉFÉRENCES ===================== */
.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.preference-card {
    background: #2a2f42;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #3a3f52;
}

.preference-header h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.preference-header p {
    color: #8a8fa3;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.preference-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-option {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #1f1f3a;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.language-option:hover {
    background: #2a2f42;
    border-color: #c77dff;
    transform: translateY(-1px);
}

.language-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.language-option input[type="radio"]:checked + .language-content {
    color: #c77dff;
}

.language-option input[type="radio"]:checked ~ * {
    color: #c77dff;
}

.language-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #b8bcc8;
    transition: color 0.3s ease;
    width: 100%;
}

.language-flag {
    font-size: 1.5rem;
}

.language-text {
    font-size: 1rem;
    font-weight: 600;
}

.preference-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.preference-option input[type="radio"],
.preference-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ffd700;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b8bcc8;
    font-size: 14px;
}

.option-icon {
    font-size: 16px;
}

/* ===================== SECTION ABONNEMENT ===================== */
.subscription-overview {
    margin-bottom: 2rem;
}

.subscription-card {
    background: linear-gradient(135deg, #2a2f42, #3a3f52);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #4a4f62;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.subscription-header h4 {
    color: #ffffff;
    font-size: 1.2rem;
}

.subscription-status {
    background: #22c55e;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: #8a8fa3;
    font-size: 14px;
}

.detail-value {
    color: #ffffff;
    font-weight: 500;
}

.subscription-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: #2a2f42;
    border: 1px solid #3a3f52;
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.action-card:hover {
    background: #3a3f52;
    border-color: #4a4f62;
    transform: translateY(-2px);
}

.action-card.danger:hover {
    background: #4a1a1a;
    border-color: #ff6b6b;
}

.action-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 0.5rem;
}

.action-title {
    color: #ffffff;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.action-description {
    color: #8a8fa3;
    font-size: 12px;
}

/* ===================== SECTION SÉCURITÉ ===================== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.security-card {
    background: #2a2f42;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #3a3f52;
}

.security-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.security-header h4 {
    color: #ffffff;
    font-size: 1.1rem;
}

.security-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.security-status.inactive {
    background: #ef4444;
    color: #ffffff;
}

.security-status.active {
    background: #22c55e;
    color: #ffffff;
}

.device-count {
    color: #8a8fa3;
    font-size: 14px;
}

.connected-devices {
    margin: 1rem 0;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1e1e2e;
    border-radius: 8px;
    margin-bottom: 8px;
}

.device-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
}

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

.device-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.device-location,
.device-last-seen {
    color: #8a8fa3;
    font-size: 12px;
}

.device-action {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-action:hover {
    background: #dc2626;
}

/* ===================== SECTION ACTIVITÉ ===================== */
.activity-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #2a2f42;
    color: #b8bcc8;
    border: 1px solid #3a3f52;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #ffd700;
    color: #000000;
    border-color: #ffd700;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 1rem;
    background: #2a2f42;
    border-radius: 12px;
    border: 1px solid #3a3f52;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-icon.login {
    background: #22c55e;
}

.activity-icon.password {
    background: #3b82f6;
}

.activity-content {
    flex: 1;
}

.activity-title {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-details {
    display: flex;
    gap: 12px;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.activity-details span {
    color: #8a8fa3;
    font-size: 12px;
    background: #1e1e2e;
    padding: 2px 8px;
    border-radius: 4px;
}

.activity-time {
    color: #8a8fa3;
    font-size: 12px;
}

/* ===================== SECTION SUPPORT ===================== */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.support-card {
    background: #2a2f42;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #3a3f52;
    text-align: center;
    transition: all 0.2s ease;
}

.support-card:hover {
    background: #3a3f52;
    transform: translateY(-2px);
}

.support-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 1rem;
}

.support-card h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.support-card p {
    color: #8a8fa3;
    font-size: 14px;
    margin-bottom: 1rem;
}

.legal-links {
    background: #2a2f42;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #3a3f52;
}

.legal-links h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.legal-link {
    color: #8a8fa3;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: #ffd700;
}

/* ===================== SECTION COMPTE ===================== */
.account-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.2s ease;
}

.account-card.warning {
    background: #4a3a1a;
    border-color: #d97706;
}

.account-card.danger {
    background: #4a1a1a;
    border-color: #ef4444;
}

.account-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.account-content {
    flex: 1;
}

.account-content h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.account-content p {
    color: #8a8fa3;
    font-size: 14px;
    margin-bottom: 1rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .settings-modal-dialog {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .settings-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .settings-navigation {
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .settings-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .nav-item {
        flex-direction: column;
        min-width: 80px;
        padding: 8px;
        text-align: center;
        gap: 4px;
    }
    
    .nav-text {
        font-size: 12px;
    }
    
    .settings-content {
        order: 1;
        flex: 1;
        padding: 1rem;
    }
    
    .settings-header {
        display: block;
        padding: 1rem;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .preferences-grid {
        grid-template-columns: 1fr;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .subscription-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .account-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Champs mot de passe avec icône œil */
.password-field {
    position: relative;
}
.password-field input[type="password"],
.password-field input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding-right: 32px; /* champ va jusqu'à l'icône, espace minimal */
}
.toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #9aa0b4;
    cursor: pointer;
}
.toggle-pw svg { width: 20px; height: 20px; }
.toggle-pw svg path, .toggle-pw svg line, .toggle-pw svg circle {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.toggle-pw:hover { color: var(--primary-color); }

/* Bascule œil / œil barré propre via classe */
.toggle-pw .icon-eye-off { display: none; }
.toggle-pw.is-visible .icon-eye { display: none; }
.toggle-pw.is-visible .icon-eye-off { display: block; }

/* ===================== MENU HAMBURGER ===================== */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.hamburger-btn:hover span {
    background: #fff;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--text-color);
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===================== MODALE KIRONGOLD ===================== */
.gold-modal-dialog {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    margin: 2rem auto;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    outline: none;
    /* tabindex: -1; */
    position: relative;
    z-index: 10002;
    background: linear-gradient(135deg, #2a2f42, #1a1a2e);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3f52;
}

.gold-modal-dialog:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.gold-header {
    text-align: center;
    margin-bottom: 25px;
}

.gold-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.gold-subtitle {
    color: var(--text-color);
    font-size: 1.1rem;
    opacity: 0.8;
}

.gold-features h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.feature-list li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 1rem;
}

.pricing-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.price-display {
    margin-bottom: 10px;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.period {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.price-note {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.payment-section {
    margin-top: 20px;
    flex-shrink: 0;
}

.payment-methods {
    text-align: center;
    margin-top: 15px;
}

.payment-methods p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-icon {
    font-size: 1.5rem;
}

/* Scrollbar personnalisée pour la modale Gold */
.gold-modal-dialog::-webkit-scrollbar {
    width: 8px;
}

.gold-modal-dialog::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.gold-modal-dialog::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gold-modal-dialog::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===================== MODALE GESTION ABONNEMENT ===================== */
.subscription-modal-dialog {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    margin: 2rem auto;
    padding: 25px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    outline: none;
    /* tabindex: -1; */
    position: relative;
    z-index: 10002;
    background: linear-gradient(135deg, #2a2f42, #1a1a2e);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3f52;
}

.subscription-modal-dialog:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.subscription-header h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
}

.subscription-status {
    text-align: center;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.subscription-status h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.subscription-status p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 20px;
}

.subscription-details {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-color);
    opacity: 0.8;
}

.detail-value {
    color: var(--text-color);
    font-weight: 600;
}

.detail-value.active {
    color: #4CAF50;
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    flex-shrink: 0;
}

/* Scrollbar personnalisée pour la modale d'abonnement */
.subscription-modal-dialog::-webkit-scrollbar {
    width: 8px;
}

.subscription-modal-dialog::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.subscription-modal-dialog::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.subscription-modal-dialog::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: scale(1.01);
    box-shadow: 0 0 3px #f44336;
}

/* ===================== FORMULAIRE STRIPE ===================== */
#stripe-payment-form {
    margin: 20px 0;
}

.StripeElement {
    background: var(--container-bg);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
}

.StripeElement--focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.StripeElement--invalid {
    border-color: #f44336;
}

.StripeElement--webkit-autofill {
    background-color: var(--container-bg) !important;
}

#stripe-submit {
    width: 100%;
    padding: 12px;
    background: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

#stripe-submit:hover {
    transform: scale(1.01);
    box-shadow: 0 0 3px var(--primary-color);
}

#stripe-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===================== RESPONSIVE POUR NOUVELLES FONCTIONNALITÉS ===================== */
@media (max-width: 640px) {
    .gold-modal-dialog,
    .subscription-modal-dialog {
        width: 95%;
        max-width: none;
        margin: 1rem auto;
        padding: 20px;
        max-height: 95vh;
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    .user-dropdown {
        right: -10px;
        min-width: 180px;
    }
    
    .subscription-actions {
        gap: 8px;
    }
}

/* ===================== FORMULAIRE D'ABONNEMENT ===================== */
.subscription-form {
    margin-bottom: 20px;
}

.form-description {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: underline;
}

.terms-link:hover {
    color: #6366f1;
}

/* ===================== SECTION SÉCURITÉ ===================== */
.security-container {
    margin: 40px 0;
    padding: 30px;
    background: #151515;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.security-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.security-card {
    background: #0f0f0f;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.security-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.security-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.security-icon svg {
    width: 32px;
    height: 32px;
}

.security-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 600;
}

.security-card p {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 0.95rem;
}

.security-card p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mode clair pour la section sécurité */
body.theme-light .security-container {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-light .security-card {
    background: white;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.theme-light .security-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body.theme-light .security-card p {
    color: #64748b;
}

body.theme-light .security-card h3 {
    color: var(--primary-color);
}

/* Responsive pour la section sécurité */
@media (max-width: 768px) {
    .security-container {
        margin: 20px 0;
        padding: 20px;
    }
    
    .security-container h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .security-card {
        padding: 20px;
    }
    
    .security-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }
    
    .security-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ===================== LIEN TEST DE SÉCURITÉ ===================== */
.security-test-link {
    color: #8a8fa3;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.security-test-link:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

body.theme-light .security-test-link {
    color: #64748b;
}

body.theme-light .security-test-link:hover {
    color: #ff6b6b;
}

/* ===================== MODALE TEST DE SÉCURITÉ ===================== */
.security-test-modal-dialog {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    position: static;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.security-test-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.password-input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.password-input-section label {
    font-weight: 600;
    color: var(--text-primary);
}

.password-input-section input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.password-input-section input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.security-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-section, .crack-time-section, .feedback-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.score-section h3, .crack-time-section h3, .feedback-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.score-bar {
    width: 100%;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.score-fill {
    height: 100%;
    background: #ef4444;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 0%;
}

.score-text {
    font-weight: 600;
    color: var(--text-primary);
}

.crack-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    text-align: center;
}

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

.feedback-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.feedback-list li:last-child {
    border-bottom: none;
}

/* Responsive pour la modale de test de sécurité */
@media (max-width: 768px) {
    .security-test-modal-dialog {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-close {
        align-self: flex-end;
    }
    
    .security-results {
        gap: 15px;
    }
    
    .score-section, .crack-time-section, .feedback-section {
        padding: 15px;
    }
}

/* ===================== ESPACES PUBLICITAIRES ===================== */
.ad-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 1200px;
    overflow: hidden;
}

.ad-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 10px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.ad-placeholder {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.ad-placeholder p {
    margin: 0 0 5px 0;
    font-weight: 500;
}

.ad-placeholder small {
    font-size: 11px;
    opacity: 0.7;
}

.ad-section {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.ad-container {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    max-width: 728px;
    width: 100%;
}

.ad-placeholder-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    text-align: center;
}

.ad-placeholder-large p {
    margin: 0 0 5px 0;
    font-weight: 500;
    font-size: 16px;
}

.ad-placeholder-large small {
    font-size: 12px;
    opacity: 0.7;
}

/* Thème sombre pour les espaces publicitaires */
.theme-dark .ad-content,
.theme-dark .ad-placeholder-large {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: #a0aec0;
}

.theme-dark .ad-label {
    background: rgba(45, 55, 72, 0.8);
    color: #a0aec0;
}

/* Responsive pour les espaces publicitaires */
@media (max-width: 768px) {
    .ad-banner {
        margin: 15px;
        border-radius: 6px;
    }
    
    .ad-content {
        min-height: 80px;
    }
    
    .ad-placeholder {
        font-size: 12px;
    }
    
    .ad-container {
        margin: 0 15px;
        border-radius: 8px;
    }
    
    .ad-placeholder-large {
        min-height: 70px;
    }
    
    .ad-placeholder-large p {
        font-size: 14px;
    }
    
    .ad-placeholder-large small {
        font-size: 11px;
    }
}
