/* ===== STYLES SPÉCIFIQUES À LA PAGE D'ACCUEIL ===== */
/* Utilise les variables et styles de base de common.css */

/* ===== LAYOUT PRINCIPAL ===== */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    min-height: 100vh;
    background: var(--background-light);
    color: var(--text-light);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.dark {
    background: var(--background-dark);
    color: var(--text-dark);
}

/* ===== EN-TÊTE ===== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--spacing-md);
}

.header .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    color: var(--text-light);
    transition: color var(--transition-normal);
}

body.dark .header .subtitle {
    color: var(--text-dark);
}

/* ===== CONTENEUR DES PROFILS ===== */
.profiles-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ===== CARTES DE PROFIL ===== */
.profile-card {
    background: var(--card-light);
    border-radius: var(--border-radius-2xl);
    padding: var(--spacing-2xl) var(--spacing-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

body.dark .profile-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-dark);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.profile-card:hover::before {
    opacity: 0.1;
}

.profile-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 
        0 20px 40px -10px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.profile-card:active {
    transform: translateY(-4px) scale(1.01);
}

.profile-content {
    position: relative;
    z-index: 2;
}

.profile-avatar {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    display: block;
    transition: transform var(--transition-normal);
}

.profile-card:hover .profile-avatar {
    transform: scale(1.1);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    transition: color var(--transition-normal);
}

body.dark .profile-name {
    color: var(--text-dark);
}

.profile-card:hover .profile-name {
    color: var(--primary-color);
}

/* ===== BOUTON DE CHANGEMENT DE THÈME ===== */
.theme-toggle {
    position: fixed;
    top: var(--spacing-2xl);
    right: var(--spacing-2xl);
    background: var(--card-light);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-light);
    z-index: var(--z-fixed);
    color: var(--text-light);
}

body.dark .theme-toggle {
    background: var(--card-dark);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-dark);
    color: var(--text-dark);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    border-color: var(--primary-color);
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-md) var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    z-index: var(--z-tooltip);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
    background: var(--primary-color);
    color: white;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ===== INDICATEUR DE PROFIL SÉLECTIONNÉ ===== */
.profile-card.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--card-light), rgba(16, 185, 129, 0.1));
}

body.dark .profile-card.selected {
    background: linear-gradient(135deg, var(--card-dark), rgba(16, 185, 129, 0.1));
}

.selected-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header .subtitle {
        font-size: 1rem;
    }

    .profiles-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        max-width: 400px;
    }

    .profile-card {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .profile-avatar {
        font-size: 3rem;
        margin-bottom: var(--spacing-md);
    }

    .profile-name {
        font-size: 1.3rem;
    }

    .theme-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        top: var(--spacing-md);
        right: var(--spacing-md);
    }
}

/* ===== ANIMATIONS SPÉCIFIQUES ===== */
/* Suppression de l'animation automatique pulse */
/* Les cartes n'ont plus de mouvement automatique, seulement au hover */

/* ===== ÉTATS DE FOCUS POUR L'ACCESSIBILITÉ ===== */
.profile-card:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== TRANSITIONS SMOOTH ===== */
* {
    transition: 
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast);
}

/* ===== OPTIMISATIONS PERFORMANCE ===== */
.profile-card,
.theme-toggle,
.notification {
    will-change: transform, opacity;
}

/* ===== SUPPORT DES PREFERS-REDUCED-MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .theme-toggle,
    .notification,
    .header,
    .profiles-container {
        animation: none;
        transition: none;
    }
    
    .profile-card:hover {
        transform: none;
    }
    
    .theme-toggle:hover {
        transform: none;
    }
}
