/*==========================================================================
  FEUILLE DE STYLE PRINCIPALE
  Version : Définitive et Corrigée
==========================================================================*/


/*==========================================================================
  1. VARIABLES ET STYLES GLOBAUX
==========================================================================*/

:root {
    --color-primary: #007bff;
    --color-secondary: #dc3545;
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-text: #e0e0e0;
    --color-text-muted: #a0a0a0;
    --font-body: 'Roboto', sans-serif;
    --font-title: 'Coiny', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    background-image: url('../Fond.jpg'); /* Assurez-vous que ce chemin est correct */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

h1, h2, h3 {
    font-family: var(--font-title);
    color: var(--color-primary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/*==========================================================================
  2. STRUCTURE DE LA PAGE
==========================================================================*/

.site-header, .site-content, .site-footer {
    width: 100%;
    padding: 20px 15px;
    text-align: center;
}

.site-content {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    background-color: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.site-footer {
    background-color: rgba(10, 10, 10, 0.9);
}

/*==========================================================================
  3. COMPOSANTS SPÉCIFIQUES
==========================================================================*/

/* --- Header --- */
.site-header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 15px var(--color-primary);
}



.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text-muted);
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
}


/* --- Galerie des Sites des Membres --- */
.section-gallery h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}
.section-gallery .section-subtitle {
    color: var(--color-text-muted);

    margin-bottom: 40px;
}

.site-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.site-card-link {
    display: block;
}
.site-card {
    width: 320px;
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.site-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 123, 255, 0.3);
}

.site-card .image-zoom-container img {
    height: 240px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.site-card:hover .image-zoom-container img {
    transform: scale(1.1);
}

.card-content {
    padding: 15px;
    text-align: left;
}
.card-content h3 {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1.1em;
    color: var(--color-text);
}


/* --- Footer & Compteur --- */
.counter-box {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
}
.counter-box span {
    color: var(--color-primary);
}
.disclaimer {
    max-width: 600px;
    margin: 0 auto 20px auto;
    color: var(--color-text-muted);
    font-size: 0.8em;
}

/* --- Animation 3D "QRZ" --- */
.qrz-effect-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 200px;
    margin: 20px auto;
}

.stage {

    width: 50%;
    height: 10%;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    transform-style: preserve-3d;
    animation: float-anim 10s infinite alternate ease-in-out;
}

.layer:after {
    content: 'SSTV';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font: bold 15vmin/1 var(--font-title);
    color: whitesmoke;
    text-shadow: 2px 10px 10px rgba(0, 0, 0, 1);
}

.layer:nth-child(1):after  { transform: translateZ(0px); }
.layer:nth-child(2):after  { transform: translateZ(-1.5px); }
.layer:nth-child(3):after  { transform: translateZ(-3px); }
.layer:nth-child(4):after  { transform: translateZ(-4.5px); }
.layer:nth-child(5):after  { transform: translateZ(-6px); }
.layer:nth-child(6):after  { transform: translateZ(-7.5px); }
.layer:nth-child(7):after  { transform: translateZ(-9px); }
.layer:nth-child(8):after  { transform: translateZ(-10.5px); }
.layer:nth-child(9):after  { transform: translateZ(-12px); }
.layer:nth-child(10):after { transform: translateZ(-13.5px); }
.layer:nth-child(11):after { transform: translateZ(-15px); }
.layer:nth-child(12):after { transform: translateZ(-16.5px); }
.layer:nth-child(13):after { transform: translateZ(-18px); }
.layer:nth-child(14):after { transform: translateZ(-19.5px); }
.layer:nth-child(15):after { transform: translateZ(-21px); }
.layer:nth-child(16):after { transform: translateZ(-22.5px); }
.layer:nth-child(17):after { transform: translateZ(-24px); }
.layer:nth-child(18):after { transform: translateZ(-25.5px); }
.layer:nth-child(19):after { transform: translateZ(-27px); }
.layer:nth-child(20):after { transform: translateZ(-28.5px); }

.layer:nth-child(n+10):after { -webkit-text-stroke: 1px var(--color-secondary); }
.layer:last-child:after { -webkit-text-stroke: 2px rgba(0,0,0,0.5); }
.layer:first-child:after { color: #fff; text-shadow: none; }

@keyframes float-anim {
    100% {
        transform: rotateY(-360deg) rotateX(360deg);
    }
}

/*==========================================================================
  5. RESPONSIVE DESIGN
==========================================================================*/

@media (max-width: 768px) {
    .site-header h1 {
        font-size: 2em;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .dropdown-menu {
        position: static; /* Le menu ne se superpose plus sur mobile */
        border: none;
        border-top: 1px solid #444;
        box-shadow: none;
        border-radius: 0;
        min-width: 100%;
        background-color: rgba(0,0,0,0.3);
    }

    .site-card {
        width: 90%;
        max-width: 350px;
    }
}
/* ================================================= */
/*          Style pour la fenêtre modale d'aide      */
/* ================================================= */

/* --- Le bouton d'aide dans l'en-tête --- */
.help-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.help-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

/* --- Le fond noir semi-transparent (overlay) --- */
.modal-overlay {
    display: none; /* Caché par défaut */
    position: fixed; /* Reste en place même si on défile */
    z-index: 2000; /* Au-dessus de tout, même de l'en-tête fixe */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permet de défiler si le contenu est trop grand */
    background-color: rgba(0,0,0,0.6); /* Noir avec 60% d'opacité */

    /* On utilise flexbox pour centrer la fenêtre */
    justify-content: center;
    align-items: center;
    
    /* Animation d'apparition */
    animation: fadeIn 0.3s ease-in-out;
}

/* --- La fenêtre de contenu elle-même --- */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    position: relative;
    animation: slideIn 0.4s ease-out;
}

/* --- Le corps du texte à l'intérieur de la modale --- */
.modal-body {
    line-height: 1.6;
    color: #f0f0f0; /* <-- On passe le texte principal en BLANC CASSÉ */
}

/* Style pour le titre H1 à l'intérieur de la modale */
.modal-body h1 {
    margin-top: 0;
    color: #ffffff; /* <-- On passe le titre en BLANC PUR pour un meilleur contraste */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* On ajoute une ombre pour la lisibilité */
}

/* Style pour les balises <code> */
.modal-body code {
    background-color: rgba(0, 0, 0, 0.3); /* Fond noir semi-transparent */
    color: #ffc107; /* Texte en jaune/ambre pour un look "terminal" */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* --- Le bouton de fermeture (le 'X') --- */
.modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: black;
    text-decoration: none;
}

/* --- Keyframes pour les animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ================================================= */
/*     Style pour le titre "Galerie des Membres"     */
/*              (Option Élégante)                    */
/* ================================================= */

.main-title-container {
    text-align: center; /* Centre le contenu horizontalement */
    margin: 60px 0 40px 0; /* Ajoute de l'espace vertical généreux */
}

.main-title-container h2 {
    /* --- On transforme le titre en "bloc" pour pouvoir le styler --- */
    display: inline-block; /* Fait en sorte que le fond ne prenne que la largeur du texte */
    padding: 15px 35px;    /* Ajoute de l'espace à l'intérieur du bandeau */
    
    /* LA LIGNE POUR ARRONDIR LES ANGLES */
    border-radius: 12px;   /* Vous pouvez ajuster cette valeur */
    
    /* --- Vos styles existants qui fonctionnent --- */
    text-align: center;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);

    /* --- Le fond dégradé que vous avez réussi à faire fonctionner --- */
    background: linear-gradient(
        to bottom, 
        rgba(80, 80, 80, 0.7), /* J'ai rendu le fond un peu plus sombre et transparent */
        rgba(40, 40, 40, 0.7)
    );

    /* --- Bonus : une petite bordure pour finir le look --- */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}