/* ==========================================================================
   1. RESET & POLICES
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

@font-face {
    font-family: 'Paulfolio'; 
    src: url('Paulfolio.otf') format('opentype');
}

@font-face {
    font-family: 'Cranio'; 
    src: url('Coolvetica Rg.otf') format('opentype');
}

/* ==========================================================================
   2. CONFIGURATION PAR DÉFAUT : MOBILE FIRST
   ========================================================================== */

/* --- EN-TETE --- */
.titre-page {
    background-color: #1D3C5D;
    padding: 15px 0 5px 0;
}
.titre-page a {
    font-size: 55px;
    font-family: 'Paulfolio', sans-serif; 
    color: #FFC90A; 
    text-decoration: none;
    display: block;
    text-align: center;
}

/* --- ZONE PRESENTATION (BLOCS) --- */
.blocs {
    background-color: #1D3C5D; 
    display: flex;
    flex-direction: column;
    padding: 20px 5% 40px 5%;
    min-height: auto;
}

.image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 50px;
    display: block;
    margin: 0 auto 25px auto; /* Centré sur mobile */
}

.texte h2 {
    font-family: 'Paulfolio', sans-serif;
    color: #FFC90A;
    font-size: 45px; 
    text-align: center;
    margin-bottom: 15px;
}

.texte p {
    font-family: 'Cranio', sans-serif;
    color: #FFC90A;
    font-size: 20px; 
    line-height: 1.4;
    text-align: center;
    margin-bottom: 25px; /* Espace propre séparant les paragraphes */
}

/* --- BOUTONS PRESENTATION --- */
.boutons-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    text-align: center;
    padding: 15px 20px;
    border: 2px solid #FFC90A;
    border-radius: 50px;
    background-color: transparent;
    color: #FFC90A;
    font-family: 'Paulfolio', sans-serif;
    font-size: 26px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #FFC90A;
    color: #1D3C5D;
}

/* --- STRUCTURES DES GALERIES (THEMES & ANNEES) --- */
.section-container {
    padding: 40px 5% 60px 5%;
}

.titre-section {
    font-family: 'Paulfolio', sans-serif;
    font-size: 45px;
    text-align: center;
    margin-bottom: 35px;
}

.grille-projets {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 1 colonne sur mobile */
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.carte-projet {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1; /* Carré parfait */
    overflow: hidden;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carte-projet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nom-label {
    position: absolute;
    bottom: 25px;
    left: 30px;
    font-family: 'Cranio', sans-serif;
    font-size: 20px;
    z-index: 2; /* S'assure que le texte reste bien au-dessus de tout */
}

/* --- STYLE DE COULEUR : INVERSION --- */

/* Section Années : Fond Jaune, Éléments Bleus */
.section-annees {
    background-color: #FFC90A;
}
.section-annees .titre-section {
    color: #1D3C5D;
}
.carte-style-bleu .nom-label {
    color: #1D3C5D;
    text-shadow: 
        2px 2px 0px #FFC90A,
       -1px -1px 0px #FFC90A,  
        1px -1px 0px #FFC90A,
       -1px 1px 0px #FFC90A;
}
.carte-style-bleu:hover {
    box-shadow: 0 15px 30px rgba(29, 60, 93, 0.35);
}

/* Section Thèmes : Fond Bleu, Éléments Jaunes */
.section-themes {
    background-color: #1D3C5D;
}
.section-themes .titre-section {
    color: #FFC90A;
}
.carte-style-jaune .nom-label {
    color: #FFC90A;
    text-shadow: 
        2px 2px 0px #1D3C5D,
       -1px -1px 0px #1D3C5D,  
        1px -1px 0px #1D3C5D,
       -1px 1px 0px #1D3C5D;
}
.carte-style-jaune:hover {
    box-shadow: 0 15px 30px rgba(255, 201, 10, 0.25);
}

/* --- ANIMATIONS COMMUNES AU SURVOL --- */
.carte-projet:hover {
    transform: translateY(-8px);
}
.carte-projet:hover img {
    transform: scale(1.08);
}


/* ==========================================================================
   3. ADAPTATION ORDINATEUR (Écrans larges >= 768px)
   ========================================================================== */
@media (min-width: 768px) {
    
    /* --- EN-TETE ORDINATEUR --- */
    .titre-page {
        padding-bottom: 0;
    }
    .titre-page a {
        font-size: 100px;
        text-align: left;
        margin-left: 5%;
        line-height: 0.9;
    }

    /* --- ZONE PRESENTATION ORDINATEUR --- */
    .blocs {
        flex-direction: row;
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 60px;
        gap: 8%;
    }

    .image {
        flex: 0 0 350px; /* L'image garde une taille fixe et idéale */
    }
    .image img {
        margin: 0; /* Aligné à gauche */
    }

    .texte {
        flex: 1;
    }
    .texte h2 {
        text-align: left;
        font-size: 80px;
        margin-bottom: 0px;
    }
    .texte p {
        text-align: left;
        font-size: 25px;
    }

    /* --- BOUTONS ORDINATEUR --- */
    .boutons-group {
        flex-direction: row; /* Côte à côte */
        gap: 5%;
    }
    .btn {
        flex: 1;
        font-size: 45px;
        padding: 20px;
    }

    /* --- GALERIES ORDINATEUR --- */
    .section-container {
        padding-top: 40px;
        padding-bottom: 80px;
    }
    
    .titre-section {
        text-align: center;
        margin-left: 5%;
        font-size: 80px;
        margin-bottom: 40px;
    }

    .grille-projets {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes parfaites et équilibrées */
        gap: 4%;
        padding: 0 5%;
    }

    .nom-label {
        font-size: 25px;
    }
}


/* =========================================
   9. PIED DE PAGE (FOND JAUNE)
   ========================================= */

.footer-site {
    background-color: #FFC90A; /* Ton jaune fétiche */
    padding: 40px 5% 60px 5%;   /* Même alignement à 5% que le reste du site */
    color: #1D3C5D;            /* Écritures en bleu marine */
}

/* Style du grand titre "Me suivre" */
.titre-footer {
    font-family: 'Paulfolio', sans-serif;
    font-size: 50px;
    color: #1D3C5D;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Conteneur des contacts (Mobile : 1 seule colonne verticale) */
.grille-contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Alignement icône + texte */
.item-contact {
    display: flex;
    align-items: center;
    justify-content: center; /* Centré sur mobile */
    gap: 15px;
    font-family: 'Cranio', sans-serif;
    font-size: 20px;
}

/* SECURITY CHECK : On limite la taille des images ICI pour le mobile */
.icone-reseau {
    width: 30px;         /* Taille parfaite sur mobile */
    height: 30px;
    object-fit: contain; /* Évite de déformer tes fichiers png */
    display: inline-block;
}

/* Style des liens cliquables */
.item-contact a {
    color: #1D3C5D;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

/* Petit effet au survol des liens */
.item-contact a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   X. ADAPTATIONS POUR LES PAGES ANNÉES SPECIFIQUES
   ========================================================================== */

/* --- BLOC CHIFFRES SUPERPOSÉS (MOBILE) --- */
.bloc-annee-xxl {
    width: 100%;
    max-width: 450px;
    margin: 0 auto 25px auto;
    display: flex;
    flex-direction: row;      /* Force les chiffres sur une seule ligne sur mobile */
    justify-content: center;  /* Centre le bloc sur l'écran du téléphone */
    gap: 10px;                /* Petit espace horizontal entre "20" et "26" */
}

.bloc-annee-xxl .chiffres {
    font-family: 'Paulfolio', sans-serif;
    color: #FFC90A;
    font-size: 125px;          /* Taille adaptée pour tenir sur une seule ligne sur mobile */
    line-height: 1;
    letter-spacing: -1px;
    text-align: center;
}

/* ==========================================================================
   XI. ZONE TELECHARGEMENTS (PAGE PROJET) - MOBILE
   ========================================================================== */

.grille-telechargements {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.btn-telechargement {
    display: flex;
    align-items: center;      /* Centre verticalement l'icône et le texte */
    justify-content: center;   /* Centre horizontalement l'ensemble */
    gap: 15px;
    padding: 20px;
    border: 2px solid #FFC90A;
    border-radius: 50px;
    background-color: transparent;
    color: #FFC90A;
    font-family: 'Cranio', sans-serif;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;          /* Permet un retour à la ligne élégant sans trop d'espace */
}

/* Changement d'état du bouton complet au survol */
.btn-telechargement:hover {
    background-color: #FFC90A;
    color: #1D3C5D;
}

/* --- LOGIQUE INTERNE DES ICÔNES --- */

/* Style de base commun aux deux icônes */
.icone-telechargement {
    height: 1.1em;
    width: auto;
    object-fit: contain;
}

/* 1. Par défaut (Bouton normal) : On montre la jaune, on cache la bleue */
.btn-telechargement .icone-jaune {
    display: inline-block;
}
.btn-telechargement .icone-bleu {
    display: none;
}

/* 2. Au survol du bouton : On cache la jaune, on montre la bleue */
.btn-telechargement:hover .icone-jaune {
    display: none;
}
.btn-telechargement:hover .icone-bleu {
    display: inline-block;
}

/* SECURITY & SCALING: L'image fait exactement la taille du texte actuel */
.icone-telechargement {
    height: 1.1em;       /* S'ajuste dynamiquement à la taille de la police */
    width: auto;         /* Garde les proportions de ton image */
    object-fit: contain;
    display: inline-block;
}


/* =========================================
   10. ADAPTATION ORDINATEUR POUR LE FOOTER
   ========================================= */
@media (min-width: 768px) {
    .titre-footer {
        font-size: 80px;  /* Version XXL comme tes autres titres */
        margin-bottom: 20px;
    }

    /* La grille passe en 4 colonnes sur ordi pour tout aligner sur une ligne */
    .grille-contact {
        grid-template-columns: repeat(4, 1fr); 
        gap: 20px 5%; 
    }

    .item-contact {
        justify-content: flex-start; /* Aligné proprement à gauche sur ordi */
        font-size: 25px;            /* Texte plus grand sur ordi */
    }

    /* Optionnel : On peut grossir un poil les icônes sur grand écran si besoin */
    .icone-reseau {
        width: 35px;
        height: 35px;
    }

 
    /* --- BLOC CHIFFRES SUPERPOSÉS (ORDINATEUR) --- */
    .bloc-annee-xxl {
        flex: 0 0 350px;       /* Garde le même gabarit que ton ancienne image */
        flex-direction: column; /* Aligne "20" et "26" l'un au-dessus de l'autre */
        align-items: flex-start;/* Aligne les blocs à gauche */
        margin: 0;
        gap: 0;                /* Supprime l'espace flex entre les lignes */
    }
    
    .bloc-annee-xxl .chiffres {
        font-size: 320px;       /* Énorme et massif sur ordi (ajusté de 220 à 260) */
        line-height: 0.65;      /* Resserre drastiquement l'espace vertical entre le haut et le bas */
        text-align: left;
        width: 100%;
        margin-bottom: -15px;   /* Astuce pour grappiller encore quelques pixels de vide */
    }

    
    /* --- TELECHARGEMENTS ORDINATEUR (MAX 2 PAR LIGNE) --- */
    .grille-telechargements {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Force 2 colonnes max */
        gap: 30px 5%;                         /* 20px d'espace si ça passe à la ligne, 8% d'écart horizontal */
        padding: 0;           
        margin: 0 auto;       
        max-width: 1200px;                     /* Aligné sur le reste du site */
    }

    .btn-telechargement {
        /* Plus besoin de flex: 1, la grille gère la taille toute seule */
        font-size: 30px; 
        justify-content: center;
    }
}