/* ============================================================
   PAGE CONNEXION (Auth) - THÈME BANNIÈRE
   ============================================================ */

.auth-body {
    background: var(--color-off-white);
    min-height: 100vh;
}

/* Header simplifié */
.auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(10, 37, 64, 0.05);
}

.auth-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    transition: var(--transition);
}

.back-link:hover {
    color: #f39c12;
    gap: 12px;
}

.back-link i {
    transition: transform var(--transition);
}

.back-link:hover i {
    transform: translateX(-4px);
}

/* Layout principal */
.auth-main {
    padding: 100px 0 40px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(10, 37, 64, 0.15);
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-container {
        grid-template-columns: 1.1fr 1fr;
    }
}

/* ============================================================
   COLONNE GAUCHE : VISUEL
   ============================================================ */
.auth-visual {
    background: linear-gradient(135deg, #0a2540 0%, #0d3a6b 50%, #061a2e 100%);
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
    display: none;
    color: var(--color-white);
}

@media (min-width: 992px) {
    .auth-visual {
        display: flex;
        align-items: center;
    }
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-badge i {
    color: #fbbf24;
}

.auth-visual-title {
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 2.4rem;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--color-white);
}

.auth-visual-title .highlight {
    color: #4a9eff;
    text-shadow: 0 0 30px rgba(74, 158, 255, 0.5);
}

.auth-visual-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-feature i {
    color: #fbbf24;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.auth-quote {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius);
    border-left: 3px solid #f39c12;
    position: relative;
}

.auth-quote > i {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.5rem;
    color: rgba(243, 156, 18, 0.3);
}

.auth-quote p {
    font-size: 0.95rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 16px;
}

.auth-quote-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-quote-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.5);
}

.auth-quote-author strong {
    display: block;
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--color-white);
}

.auth-quote-author span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Formes décoratives flottantes */
.auth-visual-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #4a9eff;
    top: -80px;
    right: -80px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: #f39c12;
    bottom: -60px;
    left: -60px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #fbbf24;
    top: 50%;
    right: 10%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

/* ============================================================
   COLONNE DROITE : FORMULAIRE
   ============================================================ */
.auth-form-wrapper {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 480px) {
    .auth-form-wrapper {
        padding: 32px 20px;
    }
}

.auth-form-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-header h2 {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.auth-form-header p {
    font-size: 0.95rem;
    color: var(--color-gray-dark);
}

/* Onglets */
.auth-tabs {
    display: flex;
    background: var(--color-gray-light);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: linear-gradient(135deg, #1e5fa8 0%, #2c7bd4 100%);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(30, 95, 168, 0.3);
}

/* Formulaires */
.auth-form {
    display: none;
    animation: authFadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper > i {
    position: absolute;
    left: 16px;
    color: var(--color-gray);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
}

.auth-input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--color-white);
    color: var(--color-text);
    transition: var(--transition);
}

.auth-input-wrapper input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.auth-input-wrapper input.error {
    border-color: var(--color-danger);
}

/* Bouton toggle password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
    font-size: 0.9rem;
}

.toggle-password:hover {
    color: #f39c12;
    background: var(--color-gray-light);
}

/* Erreur */
.auth-error {
    font-size: 0.78rem;
    color: var(--color-danger);
    display: none;
}

.auth-field.error .auth-error {
    display: block;
}

.auth-field.error .auth-input-wrapper input {
    border-color: var(--color-danger);
}

/* Hint */
.auth-hint {
    font-size: 0.78rem;
    color: var(--color-gray);
}

/* Options (remember me / forgot) */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #f39c12;
    cursor: pointer;
}

.auth-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f39c12;
    transition: var(--transition);
}

.auth-link:hover {
    color: #d35400;
    text-decoration: underline;
}

/* Bouton principal */
.btn-auth-submit {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    gap: 10px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #1e5fa8 0%, #2c7bd4 100%);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(30, 95, 168, 0.35);
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #0a2540 0%, #1e5fa8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 95, 168, 0.5);
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--color-gray);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-gray-light);
}

/* Bouton Google */
.btn-google {
    width: 100%;
    padding: 13px;
    background: var(--color-white);
    border: 2px solid var(--color-gray-light);
    border-radius: var(--radius-full);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-bottom: 20px;
}

.btn-google:hover {
    border-color: #f39c12;
    background: var(--color-off-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-google i {
    color: #ea4335;
    font-size: 1.1rem;
}

/* Switch */
.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.auth-switch-link {
    font-weight: 700;
    color: #f39c12;
    transition: var(--transition);
}

.auth-switch-link:hover {
    color: #d35400;
    text-decoration: underline;
}

/* Force du mot de passe */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--color-gray-light);
    border-radius: 2px;
    transition: var(--transition);
}

.password-strength[data-level="1"] .strength-bar:nth-child(1) {
    background: var(--color-danger);
}

.password-strength[data-level="2"] .strength-bar:nth-child(-n+2) {
    background: #f39c12;
}

.password-strength[data-level="3"] .strength-bar:nth-child(-n+3) {
    background: #1e5fa8;
}

.password-strength[data-level="4"] .strength-bar {
    background: #10b981;
}

/* CGU */
.auth-checkbox-cgu {
    align-items: flex-start;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-checkbox-cgu input {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Succès */
.auth-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    animation: authFadeIn 0.5s ease;
}

.auth-success.show {
    display: flex;
}

.auth-success i {
    font-size: 4rem;
    color: #f39c12;
    margin-bottom: 16px;
    animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes successPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.auth-success h3 {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.5rem;
    color: #f39c12;
    margin-bottom: 8px;
}

.auth-success p {
    color: var(--color-gray-dark);
    margin-bottom: 20px;
}

.auth-loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-light);
    border-top-color: #f39c12;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Note de bas de page */
.auth-footer-note {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-footer-note i {
    color: #fbbf24;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 0 16px;
        box-shadow: none;
        background: transparent;
    }

    .auth-form-wrapper {
        background: var(--color-white);
        border-radius: var(--radius-lg);
        padding: 28px 20px;
        box-shadow: var(--shadow-md);
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
/* ============================================================
   GESTION DU BOUTON RETOUR (DESKTOP / MOBILE)
   ============================================================ */

/* Par défaut (Desktop) : on affiche "Retour à l'accueil" */
.text-desktop {
    display: inline;
}
.text-mobile {
    display: none;
}

/* Sur mobile (écrans de moins de 768px) : on inverse */
@media (max-width: 768px) {
    .text-desktop {
        display: none;
    }
    .text-mobile {
        display: inline;
        font-weight: 600; /* Optionnel : pour rendre "Retour" un peu plus visible */
    }
    
    /* Optionnel : On réduit un peu l'espacement pour que ça rentre bien */
    .back-link {
        gap: 6px;
        font-size: 0.85rem;
    }
}