/* ==========================================================================
   BEN'S LINE DANCE
   index.css
   --------------------------------------------------------------------------
   Styles propres à la page d'accueil
   Le système global est dans : style.css
   ========================================================================== */


/* ==========================================================================
   1. CONTENEUR PRINCIPAL
   ========================================================================== */

.index-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ==========================================================================
   2. INTRODUCTION
   ========================================================================== */

.index-intro {
    text-align: center;
    padding: 55px 20px 35px;
}

.index-intro .eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--primary-color);
}

.index-intro h1 {
    margin: 0;

    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
    font-weight: 900;

    color: var(--text-dark);
}

.index-intro p {
    max-width: 650px;
    margin: 16px auto 0;

    font-size: 1.05rem;
    line-height: 1.6;

    color: var(--text-muted);
}


/* ==========================================================================
   3. STATISTIQUES
   ========================================================================== */

.index-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;

    margin: 0 auto 35px;
}

.index-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 105px;
    padding: 18px 12px;

    text-align: center;

    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.index-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.index-stat-number {
    display: block;

    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1;
    font-weight: 900;

    color: var(--primary-color);
}

.index-stat-label {
    display: block;

    margin-top: 8px;

    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: var(--text-muted);
}


/* ==========================================================================
   4. SECTION TITRE
   ========================================================================== */

.index-section {
    margin-bottom: 42px;
}

.index-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 18px;
}

.index-section-title {
    margin: 0;

    font-size: clamp(1.35rem, 3vw, 1.8rem);
    line-height: 1.2;
    font-weight: 850;

    color: var(--text-dark);
}

.index-section-subtitle {
    margin: 6px 0 0;

    font-size: 0.95rem;
    color: var(--text-muted);
}

.index-section-link {
    flex-shrink: 0;

    font-size: 0.9rem;
    font-weight: 800;

    color: var(--primary-color);
    text-decoration: none;

    transition: opacity 0.2s ease;
}

.index-section-link:hover {
    opacity: 0.75;
}


/* ==========================================================================
   5. RACCOURCIS
   --------------------------------------------------------------------------
   Les anciennes grosses cartes deviennent de vrais boutons.
   ========================================================================== */

.index-shortcuts {
    display: grid;

    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.index-shortcut {
    position: relative;

    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 82px;
    padding: 15px 17px;

    color: inherit;
    text-decoration: none;

    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.index-shortcut:hover {
    transform: translateY(-3px);

    border-color: var(--primary-color);

    box-shadow: var(--shadow-md);
}


/* Icône */

.index-shortcut-icon {
    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    border-radius: 14px;

    font-size: 1.35rem;

    background: var(--primary-light);
    color: var(--primary-color);
}


/* Texte */

.index-shortcut-content {
    min-width: 0;
}

.index-shortcut-title {
    display: block;

    margin-bottom: 3px;

    font-size: 0.98rem;
    font-weight: 850;

    color: var(--text-dark);
}

.index-shortcut-text {
    display: block;

    font-size: 0.78rem;
    line-height: 1.35;

    color: var(--text-muted);
}


/* Flèche */

.index-shortcut-arrow {
    margin-left: auto;

    font-size: 1.25rem;
    font-weight: 700;

    color: var(--text-muted);

    transition: transform 0.2s ease;
}

.index-shortcut:hover .index-shortcut-arrow {
    transform: translateX(3px);
}


/* ==========================================================================
   6. RACCOURCI PRINCIPAL — BIBLIOTHÈQUE
   ========================================================================== */

.index-library {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 25px 28px;

    color: inherit;
    text-decoration: none;

    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--primary-dark)
        );

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-md);

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.index-library:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.index-library-content {
    min-width: 0;
}

.index-library-label {
    display: block;

    margin-bottom: 6px;

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.75);
}

.index-library-title {
    margin: 0;

    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.15;
    font-weight: 900;

    color: #fff;
}

.index-library-text {
    margin: 8px 0 0;

    font-size: 0.9rem;
    line-height: 1.45;

    color: rgba(255, 255, 255, 0.85);
}

.index-library-count {
    flex: 0 0 auto;

    text-align: center;
}

.index-library-count strong {
    display: block;

    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
    font-weight: 900;

    color: #fff;
}

.index-library-count span {
    display: block;

    margin-top: 5px;

    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   7. NIVEAUX
   ========================================================================== */

.index-levels {
    display: grid;

    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.index-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 115px;
    padding: 16px 10px;

    text-align: center;
    text-decoration: none;

    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.index-level:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.index-level-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin-bottom: 9px;

    border-radius: 50%;

    font-size: 0.9rem;
    font-weight: 900;

    background: var(--primary-light);
    color: var(--primary-color);
}

.index-level-name {
    font-size: 0.9rem;
    font-weight: 850;

    color: var(--text-dark);
}

.index-level-count {
    margin-top: 3px;

    font-size: 0.75rem;

    color: var(--text-muted);
}


/* ==========================================================================
   8. DERNIÈRES DANSES
   ========================================================================== */

.index-dances {
    display: grid;

    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.index-dance {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 15px;

    text-decoration: none;
    color: inherit;

    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.index-dance:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.index-dance-image {
    flex: 0 0 58px;

    width: 58px;
    height: 58px;

    border-radius: 12px;

    object-fit: cover;
}

.index-dance-content {
    min-width: 0;
}

.index-dance-name {
    display: block;

    overflow: hidden;

    font-size: 0.95rem;
    font-weight: 850;
    line-height: 1.25;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: var(--text-dark);
}

.index-dance-level {
    display: inline-block;

    margin-top: 6px;
    padding: 4px 8px;

    border-radius: 999px;

    font-size: 0.68rem;
    font-weight: 800;

    background: var(--primary-light);
    color: var(--primary-color);
}

.index-dance-info {
    display: block;

    margin-top: 5px;

    font-size: 0.72rem;

    color: var(--text-muted);
}


/* ==========================================================================
   9. BOUTON VOIR LA BIBLIOTHÈQUE
   ========================================================================== */

.index-more {
    display: flex;
    justify-content: center;

    margin-top: 22px;
}

.index-more a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0 22px;

    border-radius: 999px;

    font-size: 0.88rem;
    font-weight: 800;

    text-decoration: none;

    background: var(--surface);
    border: 1px solid var(--border-color);

    color: var(--text-dark);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.index-more a:hover {
    background: var(--primary-color);
    color: #fff;

    transform: translateY(-2px);
}


/* ==========================================================================
   10. MOBILE
   ========================================================================== */

@media (max-width: 768px) {

    .index-main {
        padding: 0 16px;
    }

    .index-intro {
        padding: 35px 10px 25px;
    }

    .index-intro p {
        font-size: 0.95rem;
    }


    /* Statistiques */

    .index-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;

        margin-bottom: 28px;
    }

    .index-stat {
        min-height: 90px;
        padding: 14px 8px;
    }


    /* Titres */

    .index-section {
        margin-bottom: 32px;
    }

    .index-section-header {
        align-items: center;
        margin-bottom: 14px;
    }

    .index-section-subtitle {
        display: none;
    }


    /* Raccourcis */

    .index-shortcuts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .index-shortcut {
        min-height: 70px;
        padding: 12px;
        gap: 10px;
    }

    .index-shortcut-icon {
        flex-basis: 38px;

        width: 38px;
        height: 38px;

        border-radius: 11px;

        font-size: 1.1rem;
    }

    .index-shortcut-title {
        font-size: 0.85rem;
    }

    .index-shortcut-text {
        display: none;
    }

    .index-shortcut-arrow {
        font-size: 1rem;
    }


    /* Bibliothèque */

    .index-library {
        padding: 20px;

        gap: 15px;
    }

    .index-library-text {
        display: none;
    }

    .index-library-count strong {
        font-size: 2rem;
    }


    /* Niveaux */

    .index-levels {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .index-level {
        min-height: 95px;
    }

    .index-level-icon {
        width: 32px;
        height: 32px;

        margin-bottom: 6px;
    }

    .index-level-name {
        font-size: 0.82rem;
    }


    /* Danses */

    .index-dances {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .index-dance {
        padding: 12px;
    }

}


/* ==========================================================================
   11. PETITS TÉLÉPHONES
   ========================================================================== */

@media (max-width: 480px) {

    .index-main {
        padding: 0 12px;
    }

    .index-intro {
        padding-top: 28px;
    }

    .index-intro h1 {
        font-size: 1.8rem;
    }


    .index-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .index-stat-number {
        font-size: 1.55rem;
    }

    .index-stat-label {
        font-size: 0.68rem;
    }


    .index-shortcuts {
        gap: 8px;
    }

    .index-shortcut {
        padding: 10px;
    }

    .index-shortcut-icon {
        flex-basis: 34px;

        width: 34px;
        height: 34px;

        font-size: 0.95rem;
    }

    .index-shortcut-title {
        font-size: 0.78rem;
    }

    .index-shortcut-arrow {
        display: none;
    }


    .index-library {
        padding: 17px;
    }

    .index-library-title {
        font-size: 1.25rem;
    }

    .index-library-count strong {
        font-size: 1.7rem;
    }

}


/* ==========================================================================
   12. TABLETTE
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {

    .index-main {
        padding: 0 22px;
    }

    .index-shortcuts {
        grid-template-columns: repeat(2, 1fr);
    }

    .index-levels {
        grid-template-columns: repeat(3, 1fr);
    }

    .index-dances {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* ==========================================================================
   13. ACCESSIBILITÉ
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .index-stat,
    .index-shortcut,
    .index-library,
    .index-level,
    .index-dance,
    .index-more a {
        transition: none;
    }

}