
/* --- LA GRILLE DES CATÉGORIES --- */
.ma-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    /* La largeur max de 1300px est déjà gérée par ton bloc d'alignement global */
    margin: 40px auto; 
}

/* --- LA CARTE (Format panoramique 21:9) --- */
.ma-cat-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9 !important; /* Conserve le format ultra-large écrasé */
    height: auto !important;
    background: #111;
    text-decoration: none;
    overflow: hidden;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

/* L'image de fond */
.ma-cat-bg {
    position: absolute;
    /* Marges négatives pour avoir de la place pour zoomer sans voir les bords */
    top: -15px; left: -15px; right: -15px; bottom: -15px; 
    background-size: cover;
    background-position: center;
    filter: grayscale(80%); /* Image assombrie et décolorée au repos */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Le filtre sombre */
.ma-cat-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    transition: background 0.4s ease;
}

/* Le contenu central */
.ma-cat-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
/* --- LE RÉTICULE (Option Focus Rapide) --- */
.ma-cat-reticle {
    width: 32px; /* L'icône est légèrement plus grande au repos */
    height: 32px;
    margin-bottom: 25px; /* L'espace élargi au-dessus du titre */
    opacity: 0.5;
    transform: scale(1);
    /* Une transition très sèche pour imiter un mécanisme optique */
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* --- LE VOYANT DE VEILLE (Option 2) --- */
.ma-cat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%; /* Ligne réduite au centre au repos */
    height: 3px;
    background-color: #F16725;
    z-index: 20;
    box-shadow: 0 -2px 10px rgba(241, 103, 37, 0.4); /* Légère lueur */
    transition: all 0.4s ease;
}

/* --- LE TITRE DE LA CATÉGORIE --- */
.ma-cat-content h3 {
    /* La Typographie Tactique */
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
    margin: 0;
    
    /* Le Verrouillage d'Alignement (Garantit la stabilité du réticule) */
    line-height: 1.4;
    min-height: 3.6rem; /* Espace fixe calibré exactement pour 2 lignes */
    display: flex;
    align-items: flex-start; /* Ancre toujours le texte par le haut */
    justify-content: center;
    text-align: center;
    width: 100%;
}

.ma-cat-btn {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: #F16725;
    font-weight: 700;
    margin-top: 15px;
    opacity: 0; /* Caché au repos */
    transform: translateY(20px); /* Décalé vers le bas au repos */
    transition: all 0.4s ease;
}

/* --- LES 4 COINS DU VISEUR HUD --- */
.ma-hud {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: #F16725;
    border-style: solid;
    opacity: 0; /* Caché au repos */
    z-index: 5;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet de rebond tactique */
}
/* Placement initial décalé vers l'extérieur pour l'effet de resserrement */
.ma-hud.top-left     { top: 15px; left: 15px; border-width: 3px 0 0 3px; transform: translate(-15px, -15px); }
.ma-hud.top-right    { top: 15px; right: 15px; border-width: 3px 3px 0 0; transform: translate(15px, -15px); }
.ma-hud.bottom-left  { bottom: 15px; left: 15px; border-width: 0 0 3px 3px; transform: translate(-15px, 15px); }
.ma-hud.bottom-right { bottom: 15px; right: 15px; border-width: 0 3px 3px 0; transform: translate(15px, 15px); }

/* ==========================================================================
   ANIMATIONS AU SURVOL (Le "Clac" Tactique)
   ========================================================================== */

/* 1. Le cadre s'allume en orange */
.ma-cat-card:hover {
    border-color: #F16725;
    box-shadow: 0 10px 30px rgba(241, 103, 37, 0.2);
}

/* 2. L'image explose en couleur et zoome */
.ma-cat-card:hover .ma-cat-bg {
    filter: grayscale(0%);
    transform: scale(1);
}

/* 3. Le fond s'assombrit légèrement pour faire péter le orange */
.ma-cat-card:hover .ma-cat-overlay {
    background: rgba(0, 0, 0, 0.75);
}

/* 4. Le titre remonte et passe en orange */
.ma-cat-card:hover .ma-cat-content h3 {
    transform: translateY(-10px);
    color: #F16725;
}

/* 5. Le bouton "EXPLORER" apparait */
.ma-cat-card:hover .ma-cat-btn {
    opacity: 1;
    transform: translateY(0);
}

/* 6. Les coins du HUD se verrouillent */
.ma-cat-card:hover .ma-hud {
    opacity: 1;
    transform: translate(0, 0); /* Les coins se rabattent à leur place exacte */
}
/* 7. Le réticule fait son focus (Acquisition de cible) */
.ma-cat-card:hover .ma-cat-reticle {
    opacity: 1;
    transform: scale(0.75); /* Resserrement net et verrouillage */
}
/* 8. Le voyant de veille s'étend sur toute la largeur */
.ma-cat-card:hover::after {
    width: 100%;
    box-shadow: 0 -2px 15px rgba(241, 103, 37, 0.8); /* La lueur s'intensifie */
}