/* =========================================================
   STYLE GÉNÉRAL DE LA PAGE
   ========================================================= */

/* Le sélecteur universel applique le box-sizing à tous les éléments.
   Cela rend les dimensions plus faciles à gérer avec padding et border. */
* {
    box-sizing: border-box;
}

/* Style global du body : couleur de fond, police et suppression des marges par défaut. */
body {
    margin: 0;
    background: #050816;
    color: #f5f7fb;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

/* Conteneur principal de la page.
   On limite la largeur pour que le contenu reste agréable à lire. */
.page {
    max-width: 1100px;
    margin: 0 auto;
    background: #0b1024;
    min-height: 100vh;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   HEADER / IMAGE PRINCIPALE
   ========================================================= */

/* Le hero sert d'en-tête visuel.
   position: relative permet de placer le texte par-dessus l'image. */
.hero {
    position: relative;
    min-height: 420px;
    overflow: hidden;
}

/* Image principale.
   object-fit: cover permet de remplir la zone sans déformer l'image. */
.hero-image {
    width: 100%;
    height: 420px;
    display: block;
    object-fit: cover;
}

/* Dégradé sombre posé sur l'image pour améliorer la lisibilité du texte. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 8, 22, 0.95), rgba(5, 8, 22, 0.25));
}

/* Bloc de texte placé au-dessus de l'image.
   z-index le garde devant le dégradé. */
.hero-content {
    position: absolute;
    z-index: 1;
    left: 50px;
    bottom: 55px;
    max-width: 600px;
}

/* Petit texte au-dessus du titre principal. */
.tag {
    margin: 0 0 10px 0;
    color: #7dd3fc;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    font-weight: bold;
}

/* Titre principal de la page. */
h1 {
    margin: 0;
    color: #ffffff;
    font-size: 72px;
    line-height: 1;
    text-transform: uppercase;
}

/* Sous-titre du hero. */
.subtitle {
    margin: 15px 0 0 0;
    color: #dbeafe;
    font-size: 22px;
}

/* =========================================================
   SECTIONS DE CONTENU
   ========================================================= */

/* Style commun des sections principales. */
.intro,
.gallery,
.footer {
    padding: 45px 55px;
}

/* Titres secondaires. */
h2 {
    margin-top: 0;
    color: #7dd3fc;
    font-size: 28px;
}

/* Paragraphes de texte.
   max-width limite la longueur des lignes pour une meilleure lecture. */
p {
    max-width: 820px;
    font-size: 18px;
    color: #d7def0;
}

/* =========================================================
   LIENS ET BOUTONS
   ========================================================= */

/* Style de base des liens. */
a {
    color: #7dd3fc;
    text-decoration: none;
}

/* Effet au survol des liens. */
a:hover {
    color: #ffffff;
}

/* Bouton principal menant au site de la NASA. */
.button-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 22px;
    background: #7dd3fc;
    color: #06101f;
    border-radius: 999px;
    font-weight: bold;
    transition: transform 0.2s, background 0.2s;
}

/* Animation légère du bouton au survol. */
.button-link:hover {
    background: #ffffff;
    color: #06101f;
    transform: translateY(-2px);
}

/* =========================================================
   GALERIE D'IMAGES
   ========================================================= */

/* Fond légèrement différent pour séparer la galerie du texte. */
.gallery {
    background: #111936;
}

/* Grille responsive pour afficher les images proprement. */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Figure regroupe une image et sa légende. */
figure {
    margin: 0;
    background: #070b19;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 14px;
    overflow: hidden;
}

/* Images de la galerie.
   On évite float, car grid gère déjà la disposition. */
.gallery img {
    width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
}

/* Légende sous chaque image. */
figcaption {
    padding: 14px 16px;
    color: #cbd5e1;
    font-size: 14px;
}

/* =========================================================
   FOOTER
   ========================================================= */

/* Pied de page avec le lien de retour. */
.footer {
    background: #050816;
    border-top: 1px solid rgba(125, 211, 252, 0.2);
}

/* Lien de retour vers la Home page. */
.back-link {
    font-weight: bold;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Adaptations pour les petits écrans. */
@media (max-width: 700px) {
    .hero,
    .hero-image {
        min-height: 340px;
        height: 340px;
    }

    .hero-content {
        left: 25px;
        right: 25px;
        bottom: 35px;
    }

    h1 {
        font-size: 46px;
    }

    .intro,
    .gallery,
    .footer {
        padding: 30px 25px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    p {
        font-size: 16px;
    }
}
