/* --- partenaires.css - feuille style--- */

/* On réutilise le style du header de page (si tu ne l'as pas mis dans style.css, laisse-le ici) */
.page-header {
    height: 40vh;
    background: 
        linear-gradient(135deg, rgba(255,0,127,0.2) 0%, rgba(26,26,26,0) 50%, rgba(0,212,255,0.15) 100%),
        linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,0,127,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.page-header h1, .page-header p { position: relative; z-index: 1; }
.page-header h1 { font-size: 3rem; text-transform: uppercase; margin-bottom: 10px; }
.page-header span { color: var(--secondary); }


/* SECTION PRINCIPALE */
.partenaires-section {
    padding: 60px 20px;
    background-color: var(--dark);
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.partenaires-category h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* LE SÉPARATEUR */
.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    margin: 60px auto;
    width: 80%;
}

/* --- EFFET FLIP CARD 3D --- */

/* GRILLE DES LOGOS */
.logo-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
}

.main-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.standard-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 1. LE CONTENEUR PRINCIPAL (La scène 3D) */
.soutien-flip-card {
    background-color: transparent;
    perspective: 1000px; /* Donne la profondeur 3D */
    cursor: pointer;
}

/* Hauteur différente selon la catégorie */
.main-grid .soutien-flip-card { height: 200px; }
.standard-grid .soutien-flip-card { height: 150px; }


/* 2. L'ÉLÉMENT QUI TOURNE (Le plateau tournant) */
.soutien-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s; /* Durée de l'animation */
    transform-style: preserve-3d; /* Indispensable pour la 3D */
}

/* L'ACTION : Au survol, on tourne de 180 degrés */
.soutien-flip-card:hover .soutien-card-inner {
    transform: rotateY(180deg);
}

/* 3. LES DEUX FACES (AVANT et ARRIÈRE) */
.soutien-front, .soutien-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Cache le dos de l'image quand elle est retournée */
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- FACE AVANT (LOGO) --- */
.soutien-front {
    background-color: white;
}

.soutien-front img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain; /* Le logo ne doit pas être coupé */
}

/* --- FACE ARRIÈRE (PHOTO) --- */
.soutien-back {
    background-color: var(--dark);
    color: white;
    transform: rotateY(180deg); /* Elle est déjà retournée au départ */
    border: 2px solid var(--secondary); /* Bordure bleue pour le style */
}

/* --- AJOUT POUR LE NOM DU SOUTIEN --- */
.soutien-back {
    position: relative; /* Sécurité pour le positionnement absolu */
}

.soutien-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 5px;
    background: rgba(0, 0, 0, 0.7); /* Fond noir semi-transparent */
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
    /* Petit effet pour ne pas gêner les coins arrondis */
    border-bottom-left-radius: 13px; 
    border-bottom-right-radius: 13px;
}

.soutien-back img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* La photo remplit tout le cadre */
    opacity: 0.8; /* Légèrement sombre pour le style */
}

/* Petit effet néon quand la carte est retournée */
.soutien-flip-card:hover .soutien-front, 
.soutien-flip-card:hover .soutien-back {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* GRILLE DES LOGOS */
.logo-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

/* Grille pour les GROS partenaires (3 colonnes max) */
.main-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Grille pour les PETITS partenaires (plus serrés, 4 colonnes max) */
.standard-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ITEM SOUTIEN */
.soutien-item {
    background: #ffffff; /* Fond blanc pour bien voir les logos */
    border-radius: 10px;
    padding: 20px;
    height: 150px; /* Hauteur fixe pour uniformiser */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.soutien-item img {
    max-width: 100%;
    max-height: 100%;
    
    /* MAGIE : Noir et blanc par défaut */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

/* EFFET HOVER */
.soutien-item:hover {
    transform: translateY(-5px); /* Monte un peu */
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3); /* Ombre bleue */
}

.soutien-item:hover img {
    filter: grayscale(0%); /* Revient en couleur */
    opacity: 1;
    transform: scale(1.05); /* Zoom léger */
}

/* SECTION APPEL A L'ACTION (BAS DE PAGE) */
.rejoindre-aventure {
    padding: 80px 20px;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    text-align: center;
    border-top: 1px solid #333;
}

.content-box {
    max-width: 700px;
    margin: 0 auto;
    border: 2px dashed var(--accent); /* Bordure pointillée vert fluo */
    padding: 40px;
    border-radius: 20px;
}

.content-box h2 {
    color: var(--accent);
    margin-top: 0;
}

.content-box p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .page-header h1 { font-size: 2rem; }
    .standard-grid { grid-template-columns: repeat(2, 1fr); } /* 2 par ligne sur mobile */
    .soutien-item { height: 120px; padding: 10px; }
}

/* --- STYLE COMING SOON (MYSTERY CARDS) --- */

.teasing-text {
    color: #ccc;
    font-style: italic;
    margin-bottom: 30px;
    font-family: 'Orbitron', sans-serif; /* Style futuriste */
    letter-spacing: 1px;
    animation: blinkText 2s infinite;
}

@keyframes blinkText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mystery-card {
    height: 200px;
    background: rgba(0, 0, 0, 0.6); /* Fond sombre transparent */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Bordure en pointillés pour l'effet "emplacement vide" */
    border: 2px dashed #555; 
    transition: all 0.3s ease;
}

.mystery-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.mystery-icon {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    line-height: 1;
    margin-bottom: 10px;
}

.mystery-label {
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: white;
}

/* COULEURS ET ANIMATIONS NÉON */

/* 1. Rose (Pink) */
.pink-glow {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
    animation: pulse-pink 2s infinite;
}
.pink-glow .mystery-icon { color: var(--primary); }

@keyframes pulse-pink {
    0% { box-shadow: 0 0 10px rgba(255, 0, 127, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 0, 127, 0.6); border-style: solid; }
    100% { box-shadow: 0 0 10px rgba(255, 0, 127, 0.2); }
}

/* 2. Bleu (Blue) */
.blue-glow {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    animation: pulse-blue 2s infinite ease-in-out;
    animation-delay: 0.5s; /* Décalage pour que ça ne clignote pas tout en même temps */
}
.blue-glow .mystery-icon { color: var(--secondary); }

@keyframes pulse-blue {
    0% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.6); border-style: solid; }
    100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }
}

/* 3. Jaune (Yellow/Accent) */
.yellow-glow {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.2);
    animation: pulse-yellow 2s infinite ease-in-out;
    animation-delay: 1s;
}
.yellow-glow .mystery-icon { color: var(--accent); }

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 10px rgba(204, 255, 0, 0.2); }
    50% { box-shadow: 0 0 25px rgba(204, 255, 0, 0.6); border-style: solid; }
    100% { box-shadow: 0 0 10px rgba(204, 255, 0, 0.2); }
}

/* --- GRILLE PRINCIPALE (ARI & Mystery) --- */
.main-grid .mystery-card,
.main-grid .soutien-link {
    height: 180px; /* Réduit de 300px à 180px pour le format rectangle */
}

.main-grid .soutien-flip-card {
    height: 100%;
}

/* --- GRILLE STANDARD (Soutiens) --- */
.standard-grid .soutien-flip-card {
    height: 120px; /* Réduit de 150px à 120px */
}

/* --- AJUSTEMENTS DES CONTENUS --- */

/* On s'assure que les photos au verso remplissent bien le nouveau format */
.soutien-back img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* On réduit un peu la taille des logos au recto pour qu'ils respirent */
.soutien-front img {
    max-width: 75%;
    max-height: 65%;
}

/* On ajuste la taille de la police pour les cartes mystère */
.main-grid .mystery-icon {
    font-size: 3.5rem; /* Un peu plus petit pour le rectangle */
    margin-bottom: 5px;
}