/* ------------------------------------------------ */
/* --- FICHIER DE STYLES GLOBAL - DARK MODE MINIMALIST --- */
/* ------------------------------------------------ */

/* --- IMPORT DE POLICE MODERNE (Inter) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ------------------- */
/* --- GENERAL & DEFAUTS --- */
/* ------------------- */
:root {
    --color-bg-primary: #1e293b;
    --color-bg-card: #2d3a4b;
    --color-text-light: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-accent: #3b82f6; /* Bleu clair pour l'actif */
    --color-hover: #007bff; /* Bleu vif pour le survol */
    --shadow-dark: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 0 3px var(--color-hover);
}

body {
    font-family: 'Inter', sans-serif; 
    background-color: var(--color-bg-primary); 
    color: var(--color-text-light); 
    margin: 0;
    padding: 20px;
    text-align: center;
}

h1 {
    color: var(--color-accent); 
    margin-bottom: 35px;
    font-size: clamp(2em, 5vw, 2.8em);
    font-weight: 700;
}

/* ------------------- */
/* --- MENU DE NAVIGATION --- */
/* ------------------- */
nav {
    margin-bottom: 40px;
    background-color: var(--color-bg-card); 
    padding: 12px 0;
    border-radius: 10px;
    box-shadow: var(--shadow-dark);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
}

nav ul li {
    margin: 0 15px;
}

nav ul a {
    text-decoration: none;
    color: var(--color-text-muted); 
    font-weight: 600;
    padding: 5px 10px;
    border-bottom: 2px solid transparent; 
    transition: border-bottom-color 0.3s, color 0.3s;
    display: inline-block;
}

nav ul a:hover {
    color: var(--color-hover); 
    border-bottom-color: var(--color-hover);
}

/* Style pour la page actuelle */
nav ul a.active {
    color: var(--color-accent); 
    border-bottom-color: var(--color-accent);
    pointer-events: none;
}


/* ------------------- */
/* --- GRILLE DE CARTES --- */
/* ------------------- */
.container {
    display: grid;
    /* Ajustement pour PC et tablette */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 25px; 
    max-width: 1200px;
    margin: 0 auto 40px; 
}

/* ------------------- */
/* --- STYLE DES CARTES --- */
/* ------------------- */
.card {
    background-color: var(--color-bg-card); 
    border-radius: 12px;
    padding: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
    box-shadow: var(--shadow-dark); 
}

.card:hover {
    transform: translateY(-5px); 
    box-shadow: var(--shadow-card-hover); 
}

.card h2 {
    margin-top: 0;
    color: var(--color-text-light); 
    border-bottom: 1px solid #475569; 
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* GRILLE D'ICÔNES À L'INTÉRIEUR DE LA CARTE */
.card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Aligner à gauche et utiliser flex pour la disposition */
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
}

.card li {
    margin: 0;
}

/* Le conteneur CLICQUABLE (La 'décoration') */
.card a {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px; /* Taille du conteneur */
    height: 60px; 
    /* MODIFICATION : Remplacer le bord rond (50%) par un bord carré arrondi (10px) */
    border-radius: 10px; 
    transition: background-color 0.2s, transform 0.1s;
    background-color: #3e5065; 
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2); 
    flex-shrink: 0; 
}

.card a:hover {
    background-color: var(--color-hover); 
    transform: scale(1.05);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); 
}

/* L'IMAGE DE L'ICÔNE elle-même */
.card a img {
    height: 50px; 
    /* Définit la largeur égale à la hauteur pour forcer l'aspect CARRÉ */
    width: 50px; 
    object-fit: cover; /* Assure que l'image remplit la zone sans déformation si possible */
    filter: brightness(1.1); 
    /* Bords arrondis de 10 pixels pour l'image carrée */
    border-radius: 10px; 
    box-shadow: none; 
}

/* ------------------- */
/* --- MEDIA QUERIES (Responsiveness) --- */
/* ------------------- */

/* TABLETTE */
@media (max-width: 992px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px; 
    }
}

/* MOBILE */
@media (max-width: 768px) {
    body {
        padding: 10px; 
    }
    h1 {
        font-size: 2em; 
        margin-bottom: 20px;
    }
    nav ul {
        flex-direction: column; 
        align-items: center;
    }
    nav ul li {
        margin: 5px 0; 
    }
    .container {
        grid-template-columns: 1fr; /* 1 seule colonne */
        gap: 15px;
    }
    .card a {
        width: 55px; 
        height: 55px;
    }
    .card a img {
        width: 45px;
        height: 45px;
    }
}
