/* =============================================
   STYLE POUR LA VERSION FINALE DU SITE
   =============================================
*/

/* 1. Variables et styles de base */
:root {
    --bg-left: #ffe3b3;        /* Beige clair */
    --bg-footer: #001c4c;     /* Bleu marine foncé */
    --text-dark: #001c4c;       /* Gris foncé pour le texte */
    --text-light: #ffe3b3;     /* Blanc */
    --logo-color: #001c4c;     /* La couleur du logo (bleu marine) */
    --cta-bg: #ffe3b3;        /* Beige pour le bouton */
    --cta-text: #001c4c;       /* Texte du bouton */

    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--font-body);
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

body {
    display: flex;
    flex-direction: column; /* Organise le body en colonne (main, puis footer) */
}


/* 2. Conteneur principal et panneaux */
.main-container {
    display: flex;
    flex: 1; /* Permet au conteneur de grandir pour remplir l'espace disponible */
    min-height: 0; /* Correction pour flexbox dans certains navigateurs */
}

.left-panel {
    flex: 0 0 40%; /* Prend 40% de la largeur */
    background-color: var(--bg-left);
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre le contenu verticalement */
    align-items: flex-start; /* Aligne le contenu à gauche */
    padding: 40px 60px;
    box-sizing: border-box;
}

.right-panel {
    flex: 1; /* Prend le reste de la largeur (60%) */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-panel .background-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recouvre l'espace sans déformer l'image */
}

/* 3. Contenu du panneau gauche */
.main-logo {
    max-width: 270px;
    height: auto;
    margin-bottom: 30px;
}

.left-panel h2 {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 40px;
    line-height: 1.5;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin-bottom: 20px;
}

.main-nav a {
    font-family: var(--font-headings);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: ''; /* Obligatoire pour créer un pseudo-élément */
    position: absolute;
    width: 0; /* Le trait est invisible au départ */
    height: 2px; /* Épaisseur du trait */
    bottom: 0; /* Positionné en bas du lien (grâce au padding-bottom) */
    left: 0; /* Commence à gauche */
    background-color: var(--logo-color); /* Utilise la couleur du logo pour le trait */
    transition: width 0.3s ease-in-out; /* Animation douce de la largeur */
}

.main-nav a:hover {
    color: #000;
}

.main-nav a:hover::after {
    width: 100%; /* Le trait prend toute la largeur au survol */
}

/* 4. Bouton sur l'image (CTA) */
.cta-button {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--cta-bg);
    color: var(--cta-text);
    padding: 12px 28px;
    text-decoration: none;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 5. Pied de page (Footer) */
.main-footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Pousse les éléments aux extrémités */
    align-items: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: #a9a9a9; /* Un gris clair au survol */
    transform: scale(1.1);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9em;
    font-family: var(--font-headings);
}

.footer-links a, .footer-links span {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 6. Responsive Design */
@media (max-width: 992px) {
    body {
        height: auto; /* Permet le défilement sur mobile */
    }

    .main-container {
        flex-direction: column; /* Empile les panneaux */
    }

    .left-panel {
        flex-basis: auto; /* Supprime la largeur fixe */
        padding: 40px 30px;
        align-items: center;
        text-align: center;
    }

    .right-panel {
        flex-basis: auto;
        min-height: 400px; /* Donne une hauteur minimale à l'image */
        width: 100%;
    }

    .main-footer {
        flex-direction: column; /* Empile les éléments du footer */
        gap: 15px;
        padding: 20px;
    }
}
/* =============================================
   STYLE POUR LA PAGE "TRAVAUX RÉCENTS"
   =============================================
*/

/* 7. Structure de la page Travaux */
.page-container {
    background-color: var(--bg-left); /* Utilise votre beige clair */
    color: var(--text-dark); /* Utilise votre bleu marine pour le texte */
    flex: 1; /* Permet à la page de prendre toute la hauteur disponible */
    width: 100%;
    padding: 20px 40px 60px 40px; /* Ajoute de l'espace autour du contenu */
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: flex-end; /* Aligne le lien "ACCUEIL" à droite */
    padding: 20px 0;
    margin-bottom: 40px;
}

.page-header a {
    font-family: var(--font-headings);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 8. Section principale et galerie (MODIFIÉ) */
.work-section {
    max-width: 1200px;
    margin: 0 auto;
}

.work-title {
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;     /* <-- LA CLÉ : Permet aux éléments de passer à la ligne */
    justify-content: center; /* <-- MIEUX : Centre les projets, plus joli quand il n'y en a que 1 ou 2 sur une ligne */
    gap: 40px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1 1 300px;     /* <-- MAGIQUE : L'élément peut grandir (1), rétrécir (1) avec une base de 300px */
    max-width: 350px;    /* <-- SÉCURITÉ : Empêche l'élément de devenir trop large sur un très grand écran */
}

/* 9. Style des images avec la forme inclinée (MODIFIÉ) */
.image-clipper {
    width: 100%;         /* <-- FLEXIBLE : L'image prend 100% de la largeur de son parent (.gallery-item) */
    aspect-ratio: 280 / 350; /* <-- MODERNE : Conserve les proportions (largeur/hauteur) sans fixer la hauteur */
    background-color: var(--bg-footer);
    clip-path: polygon(0 15%, 100% 0, 100% 85%, 0% 100%);
    transition: transform 0.3s ease-in-out;
}

.image-clipper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover .image-clipper {
    transform: scale(1.05);
}

.project-link {
    font-family: var(--font-headings);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.project-link:hover {
    border-color: var(--text-dark);
}

/* 10. Responsive pour la page Travaux (SIMPLIFIÉ) */
@media (max-width: 768px) {
    .work-title {
        text-align: center;
        font-size: 1.8rem;
    }
    .page-container {
        padding: 20px;
    }
}

/* 11. Structure de la page CV */
.cv-section {
    max-width: 1600px; /* Plus large pour accueillir les 3 colonnes */
    margin: 0 auto;
    font-size: 0.9rem; /* Texte un peu plus petit pour un CV dense */
    line-height: 1.6;
}

.cv-grid {
    display: grid;
    /* Crée 3 colonnes de largeur égale */
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* Espace entre les colonnes */
}

.cv-main-title {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 40px;
    text-transform: uppercase;
}

.cv-sub-section {
    margin-bottom: 30px;
}

/* Titres type "COLLÈGE :", "LYCÉE :" */
.cv-sub-title {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Titres type "COMPÉTENCES PÉDAGOGIQUES" */
.cv-category-title {
    font-family: var(--font-body); /* Utilise la police du corps de texte */
    font-size: 0.9rem;
    font-weight: 700; /* Mais en gras */
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* 12. Style des listes à puces du CV */
.cv-sub-section ul {
    list-style: none; /* Enlève les puces par défaut */
    padding-left: 10px;
    margin: 0;
}

/* Gère les listes imbriquées (ex: sous "LYCÉE") */
.cv-sub-section ul ul {
    padding-left: 20px;
    margin-top: 10px;
}

.cv-sub-section li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 15px; /* Espace pour la puce personnalisée */
}

/* Crée la puce personnalisée (le "•") */
.cv-sub-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
}

/* Style pour les mots en gras (ex: "Ingénierie pédagogique :") */
.cv-sub-section li strong {
    font-weight: 700;
    color: var(--text-dark); /* Assure la bonne couleur */
}


/* 13. Responsive pour la page Curriculum */

@media (max-width: 1024px) {
    /* Sur tablette, on passe à 2 colonnes */
    .cv-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .cv-section {
        font-size: 0.85rem; /* Réduit un peu le texte */
    }
}

@media (max-width: 768px) {
    /* Sur mobile, tout passe sur 1 colonne */
    .cv-grid {
        grid-template-columns: 1fr;
    }
    .cv-main-title {
        text-align: center; /* Centre les titres principaux */
        font-size: 1.8rem;
    }
}

/* 14. Structure de la page "À Propos" */
.about-section {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px; /* Espace au-dessus du contenu */
}

.about-content {
    display: flex;
    align-items: flex-start; /* Aligne le texte en haut de l'image */
    gap: 50px; /* Espace entre l'image et le texte */
}

.about-image-container {
    flex: 0 0 40%; /* L'image prend 40% de la largeur */
}

.about-image-container img {
    width: 100%;
    height: auto; /* Garde les proportions */
    display: block; /* Évite les espaces blancs sous l'image */
}

.about-text {
    flex: 1; /* Le texte prend le reste de la place */
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7; /* Hauteur de ligne pour une bonne lisibilité */
    margin: 0 0 20px 0; /* Espace entre les paragraphes */
    color: var(--text-dark); /* Utilise votre variable de couleur */
}

.about-text p:last-child {
    margin-bottom: 0; /* Pas de marge après le dernier paragraphe */
}

/* 15. Responsive pour la page "À Propos" */

/* Empile l'image et le texte sur les tablettes et écrans plus petits */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column; /* Passe en mode colonne */
        align-items: center; /* Centre l'image */
    }

    .about-image-container {
        flex-basis: auto;
        width: 100%;
        max-width: 500px; /* Évite que l'image soit trop large */
        margin-bottom: 30px; /* Espace entre l'image et le texte */
    }

    /* Le style .cv-main-title est déjà centré sur mobile grâce à vos règles précédentes */
}
/* 16. Conteneur des boutons de navigation */
.about-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne sur mobile */
    gap: 20px; /* Espace entre les boutons */
    margin-top: 50px; /* Espace au-dessus des boutons */
    padding-bottom: 20px; /* Un peu d'espace avant le footer */
}

/* 17. Style des boutons */
/* (Style similaire à .cta-button mais avec couleurs inversées) */
.btn-link {
    background-color: var(--text-dark); /* Fond bleu marine */
    color: var(--text-light); /* Texte beige clair */
    padding: 12px 28px;
    text-decoration: none;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px; /* Bords arrondis pour la forme "pilule" */
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap; /* Empêche le texte du bouton de se casser */
}

.btn-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
