/* ============================================
   MODALE COMPTE - DESKTOP
   Version: 1.1.0 - 14/01/2026
   Changelog: Modale login agrandie sur PC (460px), 
              éléments mieux proportionnés
   ============================================ */

/* Desktop uniquement - Modale classique centrée */
@media (min-width: 769px) {
    /* Overlay */
    #authOverlay,
    .modal-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 9999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease, visibility 0s 0.3s;
        pointer-events: none !important;
        display: none !important;
    }
    
    #authOverlay.active,
    .modal-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        display: block !important;
        transition: opacity 0.3s ease, visibility 0s 0s;
    }
    
    /* Modale centrée - Taille auto */
    #authModal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.98);
        width: 90%;
        max-width: 500px;
        height: auto !important;
        max-height: 85vh !important;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-radius: 24px;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
        z-index: 10000 !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.2s;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
        pointer-events: none;
    }
    
    #authModal::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }
    
    #authModal.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
        transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s, max-height 0.3s ease;
    }
    
    /* Mode inscription - Modale plus grande */
    #authModal.register-mode {
        max-height: 92vh;
        min-height: 650px;
    }
    
    /* Réduire les espacements en mode inscription */
    #authModal.register-mode .modal__content {
        padding: 40px 32px 45px;
    }
    
    #authModal.register-mode .auth-toggle {
        margin-bottom: 14px;
    }
    
    #authModal.register-mode .form-group {
        margin-bottom: 8px;
    }
    
    #authModal.register-mode .form-row {
        margin-bottom: 8px;
    }
    
    #authModal.register-mode .form-label {
        margin-bottom: 5px;
        font-size: 13px;
    }
    
    #authModal.register-mode .form-input {
        padding: 10px 13px;
        font-size: 13.5px;
    }
    
    #authModal.register-mode .form-options {
        margin-bottom: 12px;
        margin-top: 8px;
    }
    
    #authModal.register-mode .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    #authModal.register-mode .input-icon-btn {
        width: 30px;
        height: 30px;
        right: 6px;
        font-size: 13px;
    }
    
    #authModal.register-mode .input-icon-btn i {
        font-size: 13px;
    }
    
    #authModal.register-mode .input-with-icon .form-input {
        padding-right: 40px;
    }
    
    /* Pas de handle sur desktop */
    #authModal::before {
        display: none;
    }
    
    /* Bouton fermer - Style uniforme carré arrondi */
    #authModal .modal__close,
    #authModal #closeAuthModal {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(184, 70, 31, 0.08) !important;
        border: none !important;
        border-radius: 12px !important;
        color: #B8461F !important;
        font-size: 24px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        cursor: pointer !important;
        z-index: 100 !important;
        transition: all 0.2s ease !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    #authModal .modal__close:hover,
    #authModal #closeAuthModal:hover {
        background: rgba(184, 70, 31, 0.15) !important;
        color: #9a3819 !important;
        transform: scale(1.05) !important;
    }
    
    #authModal .modal__close:active,
    #authModal #closeAuthModal:active {
        transform: scale(0.95) !important;
    }
    
    /* Contenu de la modale - avec scroll si nécessaire */
    .modal__content {
        flex: 1;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        padding: 45px 35px 35px;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.25s ease 0.1s, transform 0.25s ease 0.1s;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(184, 70, 31, 0.3) transparent !important;
    }
    
    .modal__content::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .modal__content::-webkit-scrollbar-track {
        background: transparent !important;
    }
    
    .modal__content::-webkit-scrollbar-thumb {
        background: rgba(184, 70, 31, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .modal__content::-webkit-scrollbar-thumb:hover {
        background: rgba(184, 70, 31, 0.5) !important;
    }
    
    #authModal.active .modal__content {
        opacity: 1;
        transform: translateY(0);
    }
    

    
    /* Toggle Connexion/Inscription */
    .auth-toggle {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
        position: relative;
        background: rgba(184, 70, 31, 0.05);
        border-radius: 12px;
        padding: 4px;
        opacity: 0;
        transform: translateY(-5px);
        transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s;
    }
    
    #authModal.active .auth-toggle {
        opacity: 1;
        transform: translateY(0);
    }
    
    .auth-toggle__btn {
        flex: 1;
        padding: 12px 18px;
        font-size: 15px;
        font-weight: 600;
        color: #6b7280;
        background: transparent;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .auth-toggle__btn.active {
        color: white;
    }
    
    .auth-toggle__btn:hover:not(.active) {
        color: #B8461F;
    }
    
    .auth-toggle__btn i {
        font-size: 14px;
    }
    
    .auth-toggle__slider {
        position: absolute;
        top: 4px;
        left: 4px;
        width: calc(50% - 4px);
        height: calc(100% - 8px);
        background: linear-gradient(135deg, #B8461F 0%, #9a3819 100%);
        border-radius: 10px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1;
        box-shadow: 0 3px 10px rgba(184, 70, 31, 0.35);
    }
    
    .auth-toggle.register .auth-toggle__slider {
        transform: translateX(calc(100% + 4px));
    }
    
    /* Formulaires */
    .auth-forms {
        position: relative;
        opacity: 0;
        transform: translateY(5px);
        transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
    }
    
    #authModal.active .auth-forms {
        opacity: 1;
        transform: translateY(0);
    }
    
    .auth-form {
        display: none;
        animation: fadeInForm 0.25s ease;
    }
    
    .auth-form--active {
        display: block;
    }
    
    @keyframes fadeInForm {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
        opacity: 0;
        animation: slideInUp 0.3s ease forwards;
    }
    
    .form-group:nth-child(1) { animation-delay: 0.25s; }
    .form-group:nth-child(2) { animation-delay: 0.3s; }
    .form-group:nth-child(3) { animation-delay: 0.35s; }
    .form-group:nth-child(4) { animation-delay: 0.4s; }
    .form-group:nth-child(5) { animation-delay: 0.45s; }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .form-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 7px;
    }
    
    .form-label i {
        font-size: 13px;
        color: #B8461F;
    }
    
    .form-input {
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
        color: #1a1a1a;
        background: rgba(255, 255, 255, 0.9);
        border: 1.5px solid rgba(0, 0, 0, 0.1);
        border-radius: 11px;
        transition: all 0.2s ease;
    }
    
    .form-input:focus {
        outline: none;
        border-color: #B8461F;
        background: white;
        box-shadow: 0 0 0 4px rgba(184, 70, 31, 0.12);
    }
    
    .form-input:hover:not(:focus) {
        border-color: rgba(184, 70, 31, 0.35);
    }
    
    .input-with-icon {
        position: relative;
        display: block;
        width: 100%;
    }
    
    .input-with-icon .form-input {
        padding-right: 48px;
        width: 100%;
        display: block;
    }
    
    .input-icon-btn {
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        color: #6b7280 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 10 !important;
    }
    
    .input-icon-btn:hover {
        color: #B8461F;
        background: rgba(184, 70, 31, 0.08);
    }
    
    .input-icon-btn i {
        font-size: 14px;
    }
    
    /* Options du formulaire */
    .form-options {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        font-size: 13px;
        opacity: 0;
        animation: slideInUp 0.3s ease 0.5s forwards;
    }
    
    .form-checkbox {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }
    
    .form-checkbox input[type="checkbox"] {
        display: none;
    }
    
    .checkbox-mark {
        width: 20px;
        height: 20px;
        border: 2px solid rgba(0, 0, 0, 0.2);
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .form-checkbox:hover .checkbox-mark {
        border-color: #B8461F;
    }
    
    .form-checkbox input[type="checkbox"]:checked + .checkbox-mark {
        background: #B8461F;
        border-color: #B8461F;
    }
    
    .form-checkbox input[type="checkbox"]:checked + .checkbox-mark::after {
        content: '✓';
        color: white;
        font-size: 13px;
        font-weight: bold;
    }
    
    .form-link {
        color: #B8461F;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .form-link:hover {
        color: #9a3819;
        text-decoration: underline;
    }
    
    /* Boutons dans la modale uniquement */
    #authModal .btn,
    .modal-overlay .btn {
        width: 100%;
        padding: 13px 22px;
        font-size: 15px;
        font-weight: 700;
        border: none;
        border-radius: 11px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        animation: slideInUp 0.3s ease 0.55s forwards;
    }
    
    #authModal .btn--full,
    .modal-overlay .btn--full {
        width: 100%;
    }
    
    #authModal .btn--gradient,
    .modal-overlay .btn--gradient {
        background: linear-gradient(135deg, #B8461F 0%, #9a3819 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(184, 70, 31, 0.3);
    }
    
    #authModal .btn--gradient:hover,
    .modal-overlay .btn--gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(184, 70, 31, 0.4);
    }
    
    #authModal .btn--gradient:active,
    .modal-overlay .btn--gradient:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(184, 70, 31, 0.3);
    }
    
    #authModal .btn--social,
    .modal-overlay .btn--social {
        background: white;
        color: #374151;
        border: 1px solid rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }
    
    #authModal .btn--social:hover,
    .modal-overlay .btn--social:hover {
        background: rgba(0, 0, 0, 0.02);
        border-color: rgba(0, 0, 0, 0.2);
        transform: translateY(-1px);
    }
    
    #authModal .btn--social:active,
    .modal-overlay .btn--social:active {
        background: rgba(0, 0, 0, 0.05);
        transform: translateY(0);
    }
    
    #authModal .btn i,
    .modal-overlay .btn i {
        font-size: 15px;
    }
    
    /* Divider */
    .auth-divider {
        display: flex;
        align-items: center;
        text-align: center;
        margin: 14px 0;
        color: #6b7280;
        font-size: 13px;
    }
    
    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .auth-divider::before {
        margin-right: 14px;
    }
    
    .auth-divider::after {
        margin-left: 14px;
    }
}

/* Empêcher le scroll du body quand la modale est ouverte */
body.modal-open {
    overflow: hidden;
}


/* ============================================
   MESSAGE DE NOTIFICATION DANS LA MODALE
   ============================================ */

.auth-modal-message {
    padding: 16px 20px;
    border-radius: 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.auth-modal-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    animation: progressBar 3s linear;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.auth-modal-message.show {
    opacity: 1;
    transform: translateY(0);
}

.auth-modal-message--success {
    background: linear-gradient(135deg, #B8461F 0%, #8B2F0F 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(184, 70, 31, 0.35);
}

.auth-modal-message--error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.auth-modal-message i {
    font-size: 22px;
    flex-shrink: 0;
    animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.auth-modal-message span {
    flex: 1;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Desktop */
@media (min-width: 769px) {
    .auth-modal-message {
        margin: 20px 0;
        padding: 16px 24px;
        font-size: 15px;
        border-radius: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .auth-modal-message {
        margin: 14px 20px;
        padding: 16px 20px;
        font-size: 15px;
        border-radius: 14px;
    }
}


/* ============================================
   MODALE COMPTE - MOBILE REGISTER COMPACT
   Réduction des espaces pour le formulaire d'inscription
   ============================================ */

@media (max-width: 768px) {
    /* Modale mobile - Bottom sheet */
    #authModal {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    #authModal.active {
        transform: translateY(0) !important;
    }
    
    /* Handle mobile en haut - petite barre de drag */
    #authModal::before {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        top: 8px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 36px !important;
        height: 4px !important;
        background: rgba(0, 0, 0, 0.15) !important;
        border-radius: 2px !important;
        z-index: 10 !important;
        box-shadow: none !important;
        border: none !important;
        filter: none !important;
    }
    
    /* Bouton fermer mobile */
    #authModal .modal__close,
    #authModal #closeAuthModal {
        position: absolute !important;
        top: 12px !important;
        left: 12px !important;
        right: auto !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(184, 70, 31, 0.08) !important;
    }
    
    /* Contenu modal compact */
    .modal__content {
        padding: 28px 18px 24px !important;
        max-height: calc(90vh - 20px) !important;
        overflow: hidden !important;
    }
    
    /* Toggle Login/Register compact */
    .auth-toggle {
        margin-bottom: 14px !important;
        padding: 3px !important;
        border-radius: 10px !important;
    }
    
    .auth-toggle__btn {
        padding: 8px 14px !important;
        font-size: 13px !important;
        gap: 5px !important;
    }
    
    .auth-toggle__btn i {
        font-size: 12px !important;
    }
    
    .auth-toggle__slider {
        border-radius: 8px !important;
    }
    
    /* Formulaires container */
    .auth-forms {
        min-height: auto !important;
    }
    
    /* Form groups - espacement réduit entre les blocs */
    .form-group {
        margin-bottom: 14px !important;
    }
    
    /* Labels */
    .form-label {
        font-size: 13px !important;
        margin-bottom: 5px !important;
        gap: 5px !important;
    }
    
    .form-label i {
        font-size: 12px !important;
    }
    
    /* Inputs - plus compacts - Override checkout.css */
    #authModal .form-input,
    #authModal .form-group input[type="text"],
    #authModal .form-group input[type="email"],
    #authModal .form-group input[type="password"],
    #authModal .form-group input[type="tel"] {
        padding: 10px 12px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        height: auto !important;
        min-height: 42px !important;
    }
    
    /* Override checkout.css pour les inputs dans authModal en mode register - un peu plus compact */
    #authModal.register-mode .form-group input[type="text"],
    #authModal.register-mode .form-group input[type="email"],
    #authModal.register-mode .form-group input[type="password"],
    #authModal.register-mode .form-group input[type="tel"],
    #authModal.register-mode .form-input {
        padding: 9px 11px !important;
        font-size: 16px !important;
        min-height: 40px !important;
    }
    
    /* Form row (First Name / Last Name) - garder en 2 colonnes */
    .form-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }
    
    /* Form group dans form-row - pas de margin bottom */
    .form-row .form-group {
        margin-bottom: 0 !important;
    }
    
    /* Input with icon (password) - Override pour authModal */
    .input-with-icon .form-input {
        padding-right: 38px !important;
    }
    
    #authModal.register-mode .input-with-icon .form-input {
        padding-right: 42px !important;
    }
    
    .input-icon-btn {
        right: 6px !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .input-icon-btn i {
        font-size: 13px !important;
    }
    
    /* Form options (checkbox terms) */
    .form-options {
        margin-bottom: 12px !important;
        margin-top: 2px !important;
    }
    
    .form-checkbox {
        font-size: 12px !important;
        gap: 6px !important;
    }
    
    .checkbox-mark {
        width: 16px !important;
        height: 16px !important;
        border-radius: 4px !important;
    }
    
    .form-checkbox input[type="checkbox"]:checked + .checkbox-mark::after {
        font-size: 10px !important;
    }
    
    .form-link {
        font-size: 12px !important;
    }
    
    /* Bouton submit compact */
    #authModal .btn,
    .auth-form .btn {
        padding: 12px 18px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        margin-top: 2px !important;
    }
    
    #authModal .btn i {
        font-size: 13px !important;
    }
    
    /* Divider compact */
    .auth-divider {
        margin: 10px 0 !important;
        font-size: 11px !important;
    }
    
    /* Social button compact */
    #authModal .btn--social {
        margin-top: 8px !important;
        padding: 10px 14px !important;
    }
}

/* Très petits écrans */
@media (max-width: 380px) {
    .modal__content {
        padding: 24px 14px 20px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .auth-toggle__btn {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}


/* ============================================
   DISCORD LOGIN - LIQUID GLASS STYLE
   Modern glassmorphism, organic, premium
   ============================================ */

.discord-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 55px 55px;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 255, 0.9) 50%,
        rgba(240, 245, 255, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    position: relative;
    overflow: visible !important;
}

/* Liquid glass background blobs */
.discord-login::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 600px 600px at 20% 20%, rgba(88, 101, 242, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 80% 30%, rgba(114, 137, 218, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 70% 80%, rgba(88, 101, 242, 0.05) 0%, transparent 50%);
    animation: liquidMove 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes liquidMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, 2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* Hide header/footer wrappers - use flat layout */
.discord-login__header,
.discord-login__footer {
    display: contents;
}

/* Icon - Floating glass orb */
.discord-login__icon {
    width: 95px;
    height: 95px;
    padding: 24px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #5865F2 0%, #7289da 50%, #5865F2 100%);
    background-size: 200% 200%;
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(88, 101, 242, 0.35),
        0 8px 25px rgba(88, 101, 242, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    animation: iconGlow 6s ease-in-out infinite, iconFloat 4s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

@keyframes iconGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

.discord-login__icon svg {
    width: 100%;
    height: 100%;
    fill: white !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* Title */
.discord-login__title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    letter-spacing: -0.8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    z-index: 2;
}

/* Subtitle */
.discord-login__subtitle {
    font-size: 17px;
    font-weight: 400;
    color: #5c5c7a;
    margin: 0 0 28px 0;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* Features - Glass pills in row */
.discord-login__features {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 14px;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    padding: 0;
}

.discord-login__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.discord-login__feature:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.15);
}

.discord-login__feature-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5865F2, #7289da);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(88, 101, 242, 0.3);
}

.discord-login__feature-icon svg {
    width: 15px;
    height: 15px;
    fill: white;
}

.discord-login__feature-text {
    display: flex;
    flex-direction: column;
}

.discord-login__feature-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2d44;
    line-height: 1.2;
}

.discord-login__feature-desc {
    display: none;
}

/* Discord Button - Liquid glass style */
.discord-login__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    padding: 20px 44px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 40px rgba(88, 101, 242, 0.4),
        0 4px 15px rgba(88, 101, 242, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    z-index: 2;
}

/* Shine sweep effect */
.discord-login__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.discord-login__btn:hover::before {
    left: 100%;
}

.discord-login__btn svg {
    width: 24px;
    height: 18px;
    flex-shrink: 0;
}

.discord-login__btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 50px rgba(88, 101, 242, 0.5),
        0 8px 25px rgba(88, 101, 242, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.discord-login__btn:active {
    transform: translateY(-1px) scale(1);
}

/* Terms */
.discord-login__terms {
    font-size: 12px;
    color: #8888a0;
    margin: 24px 0 0 0;
    line-height: 1.6;
    text-align: center;
    position: relative;
    z-index: 2;
}

.discord-login__terms a {
    color: #5865F2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.discord-login__terms a:hover {
    text-decoration: underline;
}

/* ============================================
   DESKTOP STYLES - Version agrandie
   ============================================ */
@media (min-width: 769px) {
    #authModal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(1) !important;
        min-height: auto !important;
        max-height: 90vh !important;
        height: auto !important;
        max-width: 520px !important;
        width: 520px !important;
        border-radius: 32px !important;
        box-shadow: 
            0 30px 100px rgba(0, 0, 0, 0.25),
            0 15px 40px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        overflow: visible !important;
        background: white !important;
        bottom: auto !important;
        right: auto !important;
    }
    
    /* Supprimer la flèche/triangle en haut sur desktop */
    #authModal::before,
    #authModal::after {
        display: none !important;
        content: none !important;
        border: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    #authModal.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }
    
    #authModal .modal__content {
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
        border-radius: 32px !important;
    }
    
    .discord-login {
        border-radius: 32px !important;
        padding: 50px 55px 45px !important;
        overflow: visible !important;
    }
    
    /* Supprimer le blob background qui peut causer des problèmes */
    .discord-login::before {
        display: none !important;
    }
    
    .discord-login__icon {
        width: 90px;
        height: 90px;
        padding: 24px;
        border-radius: 26px;
        margin-bottom: 24px;
    }
    
    .discord-login__title {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .discord-login__subtitle {
        font-size: 17px;
        margin-bottom: 28px;
    }
    
    .discord-login__features {
        margin-bottom: 32px;
        gap: 14px;
    }
    
    .discord-login__feature {
        padding: 14px 20px;
    }
    
    .discord-login__feature-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .discord-login__feature-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .discord-login__feature-title {
        font-size: 15px;
    }
    
    .discord-login__btn {
        padding: 20px 40px;
        font-size: 17px;
        max-width: 340px;
    }
    
    .discord-login__btn svg {
        width: 26px;
        height: 20px;
    }
    
    .discord-login__terms {
        margin-top: 22px;
        font-size: 13px;
    }
    
    /* Close button - Glass style */
    #authModal .modal__close,
    #authModal #closeAuthModal {
        top: 18px !important;
        right: 18px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.6) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
        color: #5c5c7a !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    }
    
    #authModal .modal__close:hover,
    #authModal #closeAuthModal:hover {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #1a1a2e !important;
        transform: scale(1.05) !important;
    }
    
    /* Footer avec bouton - s'assurer qu'il est visible */
    .discord-login__footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
}

/* ============================================
   MOBILE STYLES - BOTTOM SHEET
   ============================================ */
@media (max-width: 768px) {
    .discord-login {
        padding: 44px 28px 36px;
        padding-bottom: calc(36px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
    }
    
    .discord-login__icon {
        width: 80px;
        height: 80px;
        padding: 20px;
        margin-bottom: 24px;
        border-radius: 24px;
    }
    
    .discord-login__title {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .discord-login__subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    .discord-login__features {
        margin-bottom: 28px;
        gap: 8px;
    }
    
    .discord-login__feature {
        padding: 8px 14px;
    }
    
    .discord-login__feature-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    
    .discord-login__feature-icon svg {
        width: 12px;
        height: 12px;
    }
    
    .discord-login__feature-title {
        font-size: 12px;
    }
    
    .discord-login__btn {
        max-width: 100%;
        padding: 16px 32px;
        font-size: 15px;
    }
    
    .discord-login__terms {
        font-size: 11px;
        margin-top: 20px;
    }
    
    /* Mobile close button */
    #authModal .modal__close,
    #authModal #closeAuthModal {
        top: 14px !important;
        left: auto !important;
        right: 14px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.6) !important;
        backdrop-filter: blur(10px) !important;
        color: #5c5c7a !important;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .discord-login {
        padding: 36px 20px 32px;
    }
    
    .discord-login__icon {
        width: 72px;
        height: 72px;
        padding: 18px;
    }
    
    .discord-login__title {
        font-size: 26px;
    }
    
    .discord-login__features {
        gap: 6px;
    }
    
    .discord-login__feature {
        padding: 6px 12px;
    }
    
    .discord-login__btn {
        padding: 14px 28px;
        font-size: 14px;
    }
}
