/* --- VARIABLES CSS --- */
:root {
    --primary: #4f46e5;
    --bg-color: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    
    /* Couleurs des niveaux */
    --color-beginner: #10b981; /* Vert */
    --color-inter: #3b82f6;    /* Bleu */
    --color-expert: #8b5cf6;   /* Violet */
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px; /* Motif de points */
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER (HERO SECTION) --- */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 40px 20px 100px 20px; /* Espace en bas pour l'effet de superposition */
    border-bottom-left-radius: 50% 20px;
    border-bottom-right-radius: 50% 20px;
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3);
}

/* --- LOGO --- */
.logo {
    width: 140px;        /* Taille du logo */
    height: auto;
    margin-bottom: 15px;
    background: white;   /* Fond blanc */
    border-radius: 50%;  /* Cercle */
    padding: 8px;        /* Espace entre l'image et le bord blanc */
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); /* Ombre portée */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(5deg); /* Petit effet au survol */
}

.hero h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 10px;
    font-weight: 300;
}

/* --- CONTENEUR PRINCIPAL --- */
.container {
    max-width: 1100px;
    margin: -60px auto 50px auto; /* Remonte sur le header */
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* --- LA GRILLE (GRID) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* --- LES CARTES (CARDS) --- */
.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Indicateur de niveau (Barre colorée en haut) */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    /* La couleur est définie plus bas */
}

/* En-tête de la carte */
.card-header {
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

/* Corps de la carte */
.card-body {
    padding: 10px 30px 30px 30px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.level-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s;
}

.card:hover .level-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Pied de carte (Prix & Bouton) */
.card-footer {
    padding: 20px 30px;
    background-color: #f9fafb;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    background: #e2e8f0;
    padding: 5px 12px;
    border-radius: 8px;
}

.btn-go {
    padding: 10px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: opacity 0.2s;
}

.btn-go:hover { opacity: 0.9; }

/* --- COULEURS SPÉCIFIQUES (THEMES) --- */

/* Débutant (A1, A2) */
.theme-beginner::before { background: var(--color-beginner); }
.theme-beginner .btn-go { background: var(--color-beginner); }
.theme-beginner:hover { border-top: 1px solid var(--color-beginner); }

/* Intermédiaire (B1, B2) */
.theme-inter::before { background: var(--color-inter); }
.theme-inter .btn-go { background: var(--color-inter); }
.theme-inter:hover { border-top: 1px solid var(--color-inter); }

/* Avancé (C1, C2) */
.theme-expert::before { background: var(--color-expert); }
.theme-expert .btn-go { background: var(--color-expert); }
.theme-expert:hover { border-top: 1px solid var(--color-expert); }

/* --- FOOTER --- */
footer {
    text-align: center;
    margin-top: 50px;
    color: #94a3b8;
    font-size: 0.9rem;
    padding-bottom: 20px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .container { margin-top: -40px; }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeInUp 0.6s ease backwards; }
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }