/* ═══════════════════════════════════════════════════════════════════════════
   INDEX PAGE - CSS Premium
   Page de connexion / inscription NautiSphere

   Structure:
   - Variables CSS (surchargeables par Supabase config)
   - Reset & Base
   - Layout 50/50 Split-Screen
   - Colonne Gauche (zone de connexion)
   - Colonne Droite (zone de crédibilité)
   - Effets Visuels (particules, overlay, brume)
   - Modale d'inscription
   - Responsive Design
   - Animations & Transitions
   - Accessibilité (prefers-reduced-motion)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   VARIABLES CSS
   Ces variables peuvent être surchargées dynamiquement via JS
   à partir de la configuration Supabase
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Couleurs principales */
    --index-primary: #00b9d1;
    --index-primary-dark: #0891b2;
    --index-secondary: #0891b2;
    --index-bg-left: #ffffff;
    --index-bg-right: #0a192f;
    --index-bg-right-alt: #0d2847;

    /* Couleurs de texte */
    --index-text-light: #ffffff;
    --index-text-dark: #1a202c;
    --index-text-muted: #718096;
    --index-text-muted-light: rgba(255, 255, 255, 0.7);

    /* Couleurs d'état */
    --index-success: #10b981;
    --index-error: #ef4444;
    --index-warning: #f59e0b;

    /* Espacements */
    --index-padding-desktop: 4rem;
    --index-padding-tablet: 2.5rem;
    --index-padding-mobile: 1.5rem;
    --index-gap: 1.5rem;

    /* Typographie */
    --index-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --index-title-size: 2rem;
    --index-subtitle-size: 1.125rem;
    --index-body-size: 0.9375rem;
    --index-small-size: 0.875rem;

    /* Bordures & Ombres */
    --index-radius: 0.75rem;
    --index-radius-lg: 1rem;
    --index-radius-full: 9999px;
    --index-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --index-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --index-shadow-input-focus: 0 0 0 3px rgba(0, 185, 209, 0.15);

    /* Transitions */
    --index-transition-fast: 150ms ease;
    --index-transition: 200ms ease;
    --index-transition-slow: 300ms ease;

    /* Effets visuels */
    --index-overlay-opacity: 0.7;
    --index-particles-color: #00b9d1;
    --index-particles-opacity: 0.2;
    --index-grid-lines-color: rgba(0, 185, 209, 0.1);
    --index-fog-intensity: 0.3;

    /* Z-index */
    --index-z-background: 1;
    --index-z-effects: 5;
    --index-z-content: 10;
    --index-z-modal: 100;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */
.index-page {
    font-family: var(--index-font);
    font-size: var(--index-body-size);
    line-height: 1.6;
    color: var(--index-text-dark);
    background-color: var(--index-bg-left);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT 50/50 SPLIT-SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.index-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLONNE GAUCHE - Zone de Connexion
   ═══════════════════════════════════════════════════════════════════════════ */
.index-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--index-padding-desktop);
    background-color: var(--index-bg-left);
    min-height: 100vh;
    position: relative;
    z-index: var(--index-z-content);
}

.index-left-content {
    width: 100%;
    max-width: 420px;
    animation: indexFadeInUp 0.6s ease-out;
}

/* Header avec logo et titres */
.index-header {
    text-align: center;
    margin-bottom: 2rem;
}

.index-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--index-radius-lg);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--index-primary) 0%, var(--index-secondary) 100%);
    box-shadow: var(--index-shadow-lg);
    overflow: hidden;
}

/* [Logo-Fix] Quand une image est chargée, supprimer le fond pour les PNG transparents */
.index-logo.has-image {
    background: transparent;
    box-shadow: none;
}

.index-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.index-logo-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--index-text-light);
}

.index-title {
    font-size: var(--index-title-size);
    font-weight: 700;
    color: var(--index-text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.index-subtitle {
    font-size: var(--index-subtitle-size);
    color: var(--index-text-muted);
    margin: 0;
    font-weight: 400;
}

/* Boutons Social Login */
.index-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.index-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--index-bg-left);
    border: 2px solid #e2e8f0;
    border-radius: var(--index-radius);
    font-size: var(--index-body-size);
    font-weight: 600;
    color: var(--index-text-dark);
    cursor: pointer;
    transition: all var(--index-transition);
    font-family: inherit;
}

.index-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

.index-social-btn:focus {
    outline: none;
    border-color: var(--index-primary);
    box-shadow: var(--index-shadow-input-focus);
}

.index-social-btn--google:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.index-social-btn--linkedin:hover {
    border-color: #0a66c2;
    color: #0a66c2;
}

.index-social-btn--facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.index-social-btn svg,
.index-social-btn i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Séparateur "ou" */
.index-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.index-divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.index-divider-text {
    font-size: var(--index-small-size);
    color: var(--index-text-muted);
    font-weight: 500;
}

/* Formulaire de connexion */
.index-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.index-label {
    font-size: var(--index-small-size);
    font-weight: 600;
    color: var(--index-text-dark);
}

.index-input-wrapper {
    position: relative;
}

.index-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--index-radius);
    font-size: var(--index-body-size);
    font-family: inherit;
    color: var(--index-text-dark);
    background: var(--index-bg-left);
    transition: all var(--index-transition);
    box-sizing: border-box;
}

.index-input:hover {
    border-color: #cbd5e1;
}

.index-input:focus {
    outline: none;
    border-color: var(--index-primary);
    box-shadow: var(--index-shadow-input-focus);
}

.index-input::placeholder {
    color: #a0aec0;
}

.index-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
}

.index-input-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--index-transition);
}

.index-input-toggle:hover {
    color: var(--index-text-dark);
}

/* États d'erreur et succès */
.index-input.error {
    border-color: var(--index-error);
    animation: indexShake 0.4s ease;
}

.index-input.success {
    border-color: var(--index-success);
}

.index-error-text {
    font-size: 0.75rem;
    color: var(--index-error);
    margin-top: 0.25rem;
}

/* Options de connexion (remember me, forgot password) */
.index-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.index-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.index-checkbox {
    width: 1rem;
    height: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--index-primary);
}

.index-checkbox-label {
    font-size: var(--index-small-size);
    color: var(--index-text-dark);
    user-select: none;
}

.index-forgot-link {
    font-size: var(--index-small-size);
    color: var(--index-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--index-transition);
}

.index-forgot-link:hover {
    color: var(--index-primary-dark);
    text-decoration: underline;
}

/* Bouton de connexion principal */
.index-submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--index-primary) 0%, var(--index-secondary) 100%);
    border: none;
    border-radius: var(--index-radius);
    font-size: var(--index-body-size);
    font-weight: 600;
    color: var(--index-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--index-transition);
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 185, 209, 0.3);
    margin-top: 0.5rem;
}

.index-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 185, 209, 0.4);
}

.index-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.index-submit-btn i {
    transition: transform var(--index-transition);
}

.index-submit-btn:hover:not(:disabled) i {
    transform: translateX(3px);
}

/* Lien d'inscription */
.index-signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: var(--index-small-size);
    color: var(--index-text-muted);
}

.index-signup-link a {
    color: var(--index-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--index-transition);
}

.index-signup-link a:hover {
    color: var(--index-primary-dark);
    text-decoration: underline;
}

/* Footer */
.index-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--index-text-muted);
}

.index-footer a {
    color: var(--index-text-muted);
    text-decoration: none;
    transition: color var(--index-transition);
}

.index-footer a:hover {
    color: var(--index-primary);
}

.index-footer-separator {
    color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLONNE DROITE - Zone de Crédibilité
   ═══════════════════════════════════════════════════════════════════════════ */
.index-right {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--index-padding-desktop);
    background-color: var(--index-bg-right);
    min-height: 100vh;
    overflow: hidden;
}

/* Image de fond */
.index-right-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--index-z-background);
}

.index-right-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay sombre */
.index-right-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 25, 47, calc(var(--index-overlay-opacity) - 0.1)) 0%,
        rgba(10, 25, 47, var(--index-overlay-opacity)) 50%,
        rgba(10, 25, 47, calc(var(--index-overlay-opacity) + 0.1)) 100%
    );
    z-index: var(--index-z-effects);
}

/* Canvas pour particules */
.index-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--index-z-effects) + 1);
    pointer-events: none;
}

/* Lignes géométriques SVG */
.index-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--index-z-effects) + 2);
    pointer-events: none;
    opacity: 0.3;
}

.index-grid-lines svg {
    width: 100%;
    height: 100%;
}

.index-grid-lines line {
    stroke: var(--index-grid-lines-color);
    stroke-width: 1;
    animation: indexGridPulse 4s ease-in-out infinite;
}

.index-grid-lines line:nth-child(2n) {
    animation-delay: 2s;
}

/* Brume sous-marine */
.index-fog {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(10, 25, 47, calc(var(--index-fog-intensity) * 2)) 0%,
        rgba(10, 25, 47, var(--index-fog-intensity)) 40%,
        transparent 100%
    );
    z-index: calc(var(--index-z-effects) + 3);
    pointer-events: none;
}

/* Contenu texte de la colonne droite — Structure 2 groupes */
.index-right-content {
    position: relative;
    z-index: var(--index-z-content);
    text-align: center;
    width: 100%;
    max-width: 520px;
    height: 100%;
    min-height: calc(100vh - 6rem);
    color: var(--index-text-light);
    animation: indexFadeIn 0.8s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* GROUPE 1 : Titre + sous-titre (centré dans la moitié haute) */
.index-right-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 2rem;
}

/* GROUPE 2 : Encarts + signatures + powered (en bas) */
.index-right-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 1rem;
}

.index-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.index-hero-subtitle {
    font-size: 1.25rem;
    color: var(--index-text-muted-light);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNATURE PARTIE 1 (en-dessous des encarts)
   ═══════════════════════════════════════════════════════════════════════════ */
.index-signature-top {
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.index-signature-line {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
    margin: 0;
    letter-spacing: 0.02em;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENCARTS / BULLETS — Layout horizontal (3 sur une ligne)
   ═══════════════════════════════════════════════════════════════════════════ */
.index-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0; /* La signature-top gère son propre margin-top */
}

/* Mode horizontal (desktop/tablette) */
.index-bullets-row {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.index-bullet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

/* Style carte pour layout horizontal */
.index-bullet-card {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    min-width: 130px;
}

.index-bullet:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(0, 185, 209, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.index-bullet-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 185, 209, 0.3) 0%, rgba(0, 185, 209, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.index-bullet-icon i {
    font-size: 1.25rem;
    color: var(--index-primary);
}

.index-bullet-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--index-text-light);
    text-align: center;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNATURE PARTIE 2 - ACCENT (en-dessous de la signature 1)
   ═══════════════════════════════════════════════════════════════════════════ */
.index-signature-bottom {
    text-align: center;
    margin-bottom: 1rem;
}

.index-signature-accent-line {
    font-size: 1.1rem;
    margin: 0;
}

.index-signature-accent {
    color: var(--index-primary);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POWERED BY (tout en bas)
   ═══════════════════════════════════════════════════════════════════════════ */
.index-powered-by {
    text-align: center;
    margin-top: 0;
}

.index-powered-by p {
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.index-powered-by .powered-prefix {
    color: rgba(255, 255, 255, 0.5);
}

.index-powered-by .powered-name {
    color: #2dd4bf;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Encarts empilés sur mobile
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
    .index-bullets-row {
        flex-direction: column;
        max-width: 280px;
    }

    .index-bullet-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 0.875rem 1rem;
    }

    .index-bullet-icon {
        width: 40px;
        height: 40px;
    }

    .index-bullet-icon i {
        font-size: 1.1rem;
    }

    .index-bullet-text {
        text-align: left;
    }

    .index-signature-line {
        font-size: 0.875rem;
    }

    .index-signature-accent {
        font-size: 1rem;
    }

    .index-powered-by p {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALE D'INSCRIPTION
   ═══════════════════════════════════════════════════════════════════════════ */
.index-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: var(--index-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--index-transition-slow);
}

.index-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.index-modal {
    background: var(--index-bg-left);
    border-radius: var(--index-radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: var(--index-shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--index-transition-slow);
}

.index-modal-overlay.active .index-modal {
    transform: scale(1) translateY(0);
}

.index-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--index-radius-full);
    border: none;
    background: transparent;
    color: var(--index-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--index-transition);
}

.index-modal-close:hover {
    background: #f1f5f9;
    color: var(--index-text-dark);
}

.index-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.index-modal-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--index-radius);
    background: linear-gradient(135deg, #0f172a 0%, var(--index-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--index-shadow);
    overflow: hidden;
}

/* [Logo-Fix] Quand une image est chargée, supprimer le fond pour les PNG transparents */
.index-modal-logo.has-image {
    background: transparent;
    box-shadow: none;
}

.index-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.index-modal-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--index-text-light);
}

.index-modal-brand-container {
    margin-bottom: 0.25rem;
}

.index-modal-brand {
    font-size: 1rem;
    color: var(--index-text-muted);
    font-weight: 600;
    margin: 0;
}

.index-modal-title-logo {
    display: block;
    margin: 0 auto 0.25rem;
    object-fit: contain;
}

.index-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--index-text-dark);
    margin: 0 0 0.25rem;
}

.index-modal-description {
    font-size: var(--index-small-size);
    color: var(--index-text-muted);
    margin: 0;
}

/* Formulaire dans la modale */
.index-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.index-modal-form .index-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Password strength indicator */
.index-password-strength {
    margin-top: 0.5rem;
}

.index-strength-bars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.index-strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background var(--index-transition);
}

.index-strength-bar.active.weak { background: var(--index-error); }
.index-strength-bar.active.medium { background: var(--index-warning); }
.index-strength-bar.active.good { background: #84cc16; }
.index-strength-bar.active.excellent { background: var(--index-success); }

.index-strength-text {
    font-size: 0.75rem;
    color: var(--index-text-muted);
}

.index-strength-text.weak { color: var(--index-error); }
.index-strength-text.medium { color: var(--index-warning); }
.index-strength-text.good { color: #84cc16; }
.index-strength-text.excellent { color: var(--index-success); }

/* Terms checkbox */
.index-terms-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.index-terms-wrapper .index-checkbox {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.index-terms-text {
    font-size: var(--index-small-size);
    color: var(--index-text-muted);
    line-height: 1.5;
}

.index-terms-text a {
    color: var(--index-primary);
    text-decoration: none;
    font-weight: 500;
}

.index-terms-text a:hover {
    text-decoration: underline;
}

/* Modal footer */
.index-modal-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    font-size: var(--index-small-size);
    color: var(--index-text-muted);
}

.index-modal-footer a {
    color: var(--index-primary);
    text-decoration: none;
    font-weight: 600;
}

.index-modal-footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════════════════════════════ */
.index-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: indexSkeleton 1.5s infinite;
    border-radius: 4px;
}

.index-skeleton-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--index-radius-lg);
    margin: 0 auto 1rem;
}

.index-skeleton-title {
    height: 2rem;
    width: 60%;
    margin: 0 auto 0.5rem;
}

.index-skeleton-subtitle {
    height: 1.125rem;
    width: 40%;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablette (768px - 1024px) */
@media (max-width: 1024px) {
    .index-left,
    .index-right {
        padding: var(--index-padding-tablet);
    }

    .index-right-content {
        min-height: calc(100vh - 5rem);
    }

    .index-hero-title {
        font-size: 2rem;
    }

    .index-hero-subtitle {
        font-size: 1.125rem;
    }

    .index-bullet {
        padding: 1rem 0.875rem;
    }

    .index-bullet-card {
        min-width: 110px;
    }

    .index-bullet-icon {
        width: 44px;
        height: 44px;
    }

    .index-bullet-icon i {
        font-size: 1.125rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .index-container {
        flex-direction: column;
    }

    .index-left {
        min-height: auto;
        padding: var(--index-padding-mobile);
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .index-right {
        display: none; /* Masquer la colonne droite sur mobile */
    }

    /* Alternative: afficher en background subtil */
    .index-page.show-right-mobile .index-right {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 0;
        opacity: 0.1;
    }

    .index-page.show-right-mobile .index-left {
        position: relative;
        z-index: 1;
        background: transparent;
    }

    .index-left-content {
        max-width: 100%;
    }

    .index-title {
        font-size: 1.75rem;
    }

    .index-subtitle {
        font-size: 1rem;
    }

    .index-social-buttons {
        gap: 0.5rem;
    }

    .index-social-btn {
        padding: 0.75rem 1rem;
    }

    .index-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .index-footer {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Modal plein écran sur mobile */
    .index-modal {
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
        padding: 1.5rem;
    }

    .index-modal-form .index-field-row {
        grid-template-columns: 1fr;
    }
}

/* Très petit mobile (< 375px) */
@media (max-width: 375px) {
    .index-left {
        padding: 1rem;
    }

    .index-logo {
        width: 56px;
        height: 56px;
    }

    .index-title {
        font-size: 1.5rem;
    }

    .index-input {
        padding: 0.75rem 0.875rem;
        padding-left: 2.5rem;
    }
}

/* Desktop large (> 1440px) */
@media (min-width: 1440px) {
    .index-container {
        max-width: 1920px;
        margin: 0 auto;
    }

    .index-left-content {
        max-width: 480px;
    }

    .index-hero-title {
        font-size: 3rem;
    }

    .index-hero-subtitle {
        font-size: 1.375rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS & KEYFRAMES
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes indexFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes indexShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

@keyframes indexSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes indexGridPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes indexBulletSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation des bullets avec délai */
.index-bullet:nth-child(1) { animation: indexBulletSlideIn 0.4s ease-out 0s both; }
.index-bullet:nth-child(2) { animation: indexBulletSlideIn 0.4s ease-out 0.1s both; }
.index-bullet:nth-child(3) { animation: indexBulletSlideIn 0.4s ease-out 0.2s both; }

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITÉ - prefers-reduced-motion
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .index-particles-canvas {
        display: none !important;
    }

    .index-grid-lines {
        display: none !important;
    }

    .index-social-btn:hover,
    .index-submit-btn:hover,
    .index-bullet:hover {
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS VISIBLE (accessibilité clavier)
   ═══════════════════════════════════════════════════════════════════════════ */
.index-social-btn:focus-visible,
.index-submit-btn:focus-visible,
.index-forgot-link:focus-visible,
.index-modal-close:focus-visible,
.index-input:focus-visible {
    outline: 2px solid var(--index-primary);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE SUPPORT (optionnel)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    .index-page.auto-dark {
        --index-bg-left: #1a202c;
        --index-text-dark: #f7fafc;
        --index-text-muted: #a0aec0;
    }

    .index-page.auto-dark .index-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .index-page.auto-dark .index-social-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .index-page.auto-dark .index-modal {
        background: #1a202c;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .index-right,
    .index-modal-overlay,
    .index-particles-canvas,
    .index-grid-lines,
    .index-fog {
        display: none !important;
    }

    .index-container {
        display: block;
    }

    .index-left {
        width: 100%;
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALE INSCRIPTION PLEIN ÉCRAN (Split 50/50)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Animation d'ouverture de la modale plein écran */
#signup-fullscreen {
    animation: signupFadeIn 0.3s ease-out;
}

#signup-fullscreen > div:last-child {
    animation: signupSlideIn 0.4s ease-out;
}

@keyframes signupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes signupSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo carré dans la modale inscription */
#signup-fullscreen .index-modal-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--index-radius);
    background: linear-gradient(135deg, #0f172a 0%, var(--index-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--index-shadow);
    overflow: hidden;
}

#signup-fullscreen .index-modal-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--index-text-light);
}

/* Logo marque centré */
#signup-brand-logo {
    display: flex;
    justify-content: center;
}

#signup-brand-logo img {
    margin: 0 auto;
}

/* Barre de force du mot de passe - segments */
#signup-fullscreen .password-strength-bar div,
#strength-seg-1,
#strength-seg-2,
#strength-seg-3,
#strength-seg-4 {
    height: 4px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

/* Checks de validation du mot de passe */
#signup-fullscreen .password-checks div,
#check-length,
#check-uppercase,
#check-number,
#check-special {
    transition: all 0.2s ease;
}

/* Bouton submit avec gradient */
#signup-submit {
    box-shadow: 0 4px 15px rgba(0, 185, 209, 0.3);
    transition: all 0.3s ease;
}

#signup-submit:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 185, 209, 0.4);
}

#signup-submit:not(:disabled):active {
    transform: translateY(0);
}

/* Responsive : masquer la partie droite sur mobile */
@media (max-width: 1023px) {
    #signup-fullscreen > .relative > div:last-child {
        display: none;
    }

    #signup-fullscreen > .relative > div:first-child {
        width: 100%;
    }
}

/* Scrollbar personnalisée pour la partie formulaire */
#signup-fullscreen > .relative > div:first-child::-webkit-scrollbar {
    width: 6px;
}

#signup-fullscreen > .relative > div:first-child::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#signup-fullscreen > .relative > div:first-child::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#signup-fullscreen > .relative > div:first-child::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
