/* ========================================
   ACCOUNT PAGES - Premium Design System
   Harmonisé avec le design moderne de l'application
   ======================================== */

/* ========================================
   LAYOUT GÉNÉRAL
   ======================================== */

.account-page-container {
    min-height: calc(100vh - 8rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg,
        #f8f9fa 0%,
        #e9ecef 50%,
        #dee2e6 100%
    );
    position: relative;
    overflow: hidden;
}

.account-page-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 50%,
        rgba(27, 110, 194, 0.08) 0%,
        transparent 50%
    );
    animation: rotateBackground 30s linear infinite;
}

@keyframes rotateBackground {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   CARTE PRINCIPALE - Design Premium
   ======================================== */

.account-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(27, 110, 194, 0.1);
    animation: cardSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header avec gradient */
.account-card-header {
    background: linear-gradient(135deg,
        #1b6ec2 0%,
        #1861ac 50%,
        #16537e 100%
    );
    padding: 1rem 2rem 0.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.account-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 70%
    );
    animation: rotateHeaderBg 20s linear infinite;
}

@keyframes rotateHeaderBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.account-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.65rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.4);
    animation: iconBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s backwards;
}

@keyframes iconBounce {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.account-icon i {
    font-size: 1.65rem;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.account-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.account-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

/* Corps de la carte */
.account-card-body {
    padding: 1.25rem 2rem;
}

/* ========================================
   FORMULAIRES - Style Premium
   ======================================== */

.form-floating {
    margin-bottom: 0.85rem;
    position: relative;
}

.form-floating > .form-control,
.form-floating > .form-select {
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafb;
    height: calc(2.85rem + 2px);
}

.form-floating > label {
    padding: 0.9rem 1.25rem;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: #1b6ec2;
    background: white;
    box-shadow: 0 0 0 4px rgba(27, 110, 194, 0.1),
                0 8px 24px rgba(27, 110, 194, 0.15);
    transform: translateY(-2px);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-select:focus ~ label {
    color: #1b6ec2;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #1b6ec2;
    border-color: #1b6ec2;
    box-shadow: 0 4px 12px rgba(27, 110, 194, 0.3);
}

.form-check-label {
    color: #2c3e50;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Messages de validation */
.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.text-danger::before {
    content: '?';
    font-size: 0.9rem;
}

.validation-summary-errors {
    background: linear-gradient(135deg,
        rgba(220, 53, 69, 0.08) 0%,
        rgba(220, 53, 69, 0.04) 100%
    );
    border: 2px solid rgba(220, 53, 69, 0.2);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.85rem;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-summary-errors li {
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ========================================
   BOUTONS - Style Premium
   ======================================== */

.btn-primary {
    width: 100%;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg,
        #1b6ec2 0%,
        #1861ac 50%,
        #1b6ec2 100%
    );
    background-size: 200% 100%;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(27, 110, 194, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(27, 110, 194, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-link {
    color: #1b6ec2;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-link:hover {
    color: #1861ac;
    gap: 0.75rem;
}

/* ========================================
   EXTERNAL LOGINS - Social Buttons
   ======================================== */

.external-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.15rem;
}

.btn-social {
    width: 100%;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-google {
    background: white;
    color: #2c3e50;
    border-color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #1b6ec2;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-facebook {
    background: #1877f2;
    color: white;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

/* ========================================
   DIVIDER - Séparateur "OU"
   ======================================== */

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.15rem 0;
    position: relative;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(27, 110, 194, 0.2) 50%,
        transparent 100%
    );
}

.login-divider span {
    padding: 0 1rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* ========================================
   FOOTER LINKS
   ======================================== */

.account-footer {
    padding: 1rem 2rem;
    background: linear-gradient(135deg,
        #f8f9fa 0%,
        #e9ecef 100%
    );
    border-top: 2px solid rgba(27, 110, 194, 0.1);
    text-align: center;
}

.account-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-footer-links a {
    color: #1b6ec2;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.account-footer-links a:hover {
    color: #1861ac;
    gap: 0.75rem;
}

/* ========================================
   MANAGE LAYOUT - Navigation Premium
   ======================================== */

.manage-nav {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.manage-nav-item {
    display: block;
    padding: 1rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.manage-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
        #1b6ec2 0%,
        #1861ac 100%
    );
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.manage-nav-item:hover::before,
.manage-nav-item.active::before {
    transform: scaleY(1);
}

.manage-nav-item:hover {
    background: linear-gradient(90deg,
        rgba(27, 110, 194, 0.08) 0%,
        rgba(27, 110, 194, 0.04) 100%
    );
    color: #1b6ec2;
    transform: translateX(8px);
}

.manage-nav-item.active {
    background: linear-gradient(135deg,
        rgba(27, 110, 194, 0.15) 0%,
        rgba(27, 110, 194, 0.08) 100%
    );
    color: #1b6ec2;
    font-weight: 600;
}

/* ========================================
   ALERTS & STATUS MESSAGES
   ======================================== */

.alert {
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 2px solid;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg,
        rgba(40, 167, 69, 0.08) 0%,
        rgba(40, 167, 69, 0.04) 100%
    );
    border-color: rgba(40, 167, 69, 0.3);
    color: #155724;
}

.alert-info {
    background: linear-gradient(135deg,
        rgba(27, 110, 194, 0.08) 0%,
        rgba(27, 110, 194, 0.04) 100%
    );
    border-color: rgba(27, 110, 194, 0.3);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg,
        rgba(255, 193, 7, 0.08) 0%,
        rgba(255, 193, 7, 0.04) 100%
    );
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .account-card {
        border-radius: 16px;
        max-width: 100%;
    }

    .account-card-header {
        padding: 2rem 1.5rem;
    }

    .account-icon {
        width: 64px;
        height: 64px;
    }

    .account-icon i {
        font-size: 2rem;
    }

    .account-title {
        font-size: 1.5rem;
    }

    .account-card-body {
        padding: 2rem 1.5rem;
    }

    .account-footer {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .account-page-container {
        padding: 1rem 0.5rem;
    }

    .account-card {
        border-radius: 12px;
    }

    .account-card-header {
        padding: 1.5rem 1.25rem;
    }

    .account-icon {
        width: 56px;
        height: 56px;
    }

    .account-icon i {
        font-size: 1.75rem;
    }

    .account-title {
        font-size: 1.35rem;
    }

    .account-card-body {
        padding: 1.5rem 1.25rem;
    }

    .form-floating > .form-control,
    .form-floating > .form-select {
        padding: 1rem 1.25rem;
        height: calc(3rem + 2px);
    }

    .form-floating > label {
        padding: 1rem 1.25rem;
    }

    .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========================================
   ANIMATIONS PERFORMANCE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optionnel)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .account-page-container {
        background: linear-gradient(135deg,
            #1a1d23 0%,
            #2c3e50 50%,
            #34495e 100%
        );
    }

    .account-card {
        background: #2c3e50;
        border-color: rgba(27, 110, 194, 0.3);
    }

    .account-card-body {
        color: #ecf0f1;
    }

    .form-floating > .form-control,
    .form-floating > .form-select {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }

    .form-floating > .form-control:focus,
    .form-floating > .form-select:focus {
        background: rgba(255, 255, 255, 0.1);
        border-color: #1b6ec2;
    }

    .form-floating > label {
        color: #95a5a6;
    }

    .account-footer {
        background: linear-gradient(135deg,
            #1a1d23 0%,
            #2c3e50 100%
        );
        border-top-color: rgba(27, 110, 194, 0.2);
    }

    .manage-nav {
        background: #34495e;
    }

    .manage-nav-item {
        color: #ecf0f1;
    }

    .manage-nav-item:hover {
        background: linear-gradient(90deg,
            rgba(27, 110, 194, 0.15) 0%,
            rgba(27, 110, 194, 0.08) 100%
        );
    }
}
