/* Variables */
:root {
    --bg: #fff;
    --text: #222;
    --accent: #4da3ff;
}

html {
    scroll-behavior: smooth;
}


@font-face {
    font-family: 'Delon';
    /* nom que tu choisis */
    src: url('../font/delon/Delon.woff') format('woff');
    font-weight: 900;
    /* ou bold si c'est une version grasse */
    font-style: normal;
    /* ou italic si c'est la version italique */
    font-display: swap; /* évite le layout shift dû aux webfonts */
}

/*Font*/
.castoro-titling-regular {
    font-family: "Castoro Titling", serif;
    font-weight: 400;
    font-style: normal;
}


/* Réinitialisation légère */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Header */
header {
    padding: 1rem 2rem;
    position: sticky;
    top: 15px;
    /* Reste visible en scrollant */
    z-index: 10;
    min-height: 60px; /* réserve la place du header pour éviter les sauts */
}

nav ul {
    list-style: none;
    justify-content: center;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

h1 {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 3rem;
    color: var(--text);
}

h2 {
    text-align: center;
    padding: 0.5rem;
    font-size: 2rem;
    margin: 1rem 1rem;
    color: var(--text);
}

h3 {
    text-align: center;
    margin: 1.5rem;
    font-size: 1.25rem;
    color: var(--text);

}

.link-menu {
    backdrop-filter: blur(4px);
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

strong {
    font-weight: 800;
}

.SectionProjets {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(1, 1fr);
    /* 2 colonnes de largeur égale */
    gap: 0.5rem;
    /* espace entre les colonnes et lignes */
    padding: 2rem;
    /* optionnel, pour aérer le contenu */
}

/* garantir que les miniatures conservent leur ratio */
.minia {
    box-shadow: 4px 0px 8px rgba(0, 0, 0, 0.25);
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.projet {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* exemple : fond pour mieux voir le bloc */
    padding: 1rem;
}

.button {
    background-color: #222;
    color: whitesmoke;
    padding: 1rem;
    margin: 1rem;
    border: none;
    box-shadow: 2px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    /* Ombre portée basique */
    transition: box-shadow 0.3s ease;
    /* Effet doux au survol */
    transition: 300ms;
    text-decoration: none;
}

.button:hover {
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Un peu plus prononcée au hover */
    background-color: whitesmoke;
    color: #222;
}

.lien {
    margin: 1%;
}

a {
    color: #4da3ff;
}

.videohome {
    width: 100%;
    object-fit: cover;
    position: relative;
    top: 0;
    aspect-ratio: 16 / 9; /* réserve l'espace avant que la vidéo charge */
    min-height: 40vh; /* ajuste selon ton design pour garantir une zone réservée */
}

.imghome {
    width: 100%;
    object-fit: cover;
    position: relative;
    top: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/*A propos*/
/* ==============================
   CONTENEUR PRINCIPAL
================================= */
#parcour #apropos {
    max-width: 1000px;
    margin: 2rem auto;
    padding-top: 2rem;
}

.apropos {
    display: flex;
    justify-content: center;
    /* Centre le contenu horizontalement */
}

.apropos-content {
    max-width: 1000px;
    /* Largeur max du bloc central */
    width: 100%;
}

.flex-parcour {
    display: flex;
    justify-content: center;
    width: 100%;
}

.parcours-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1000px;
    /* Largeur max du bloc central */
    width: 100%;
}

/* ==============================
   TEXTE
================================= */

.about-text .intro,
.about-text .conclusion {

    color: #222;
    margin-bottom: 1.5rem;
}

/* ==============================
   TIMELINE
================================= */

/* Date */
.timeline-date {
    font-weight: bold;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Carte d'expérience */
.timeline-content {
    background: var(--bg);
    padding: 1rem;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin: 1rem;
}

.skills-category {
        border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.timeline-content h3 {
    margin-top: 0;
    color: #222;
    font-size: 1.2rem;
}

.timeline-content p {
    margin: 0.3rem 0 0 0;
    color: #555;
    line-height: 1.5;
}

/* ==============================
   RESPONSIVE
================================= */

@media (max-width: 768px) {
    .apropos-content {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .about-text h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* Grille des compétences */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: end;
    /* ✅ Centre toutes les icônes */
    gap: 2rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-item img {
    height: 50px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

/*Footer*/

.footer-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    text-align: center;
    transition: color 0.3s ease;
    gap: 0.5rem;
}

.footer-container li a {
    color: #222;
}

/*Ecran de chargement*/
/* Loader plein écran */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    /* couleur de fond pendant le chargement */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    /* reste au-dessus de tout */
}

/* Petit spinner animé */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ddd;
    border-top-color: #0077ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Texte sous le spinner */
#loader p {
    font-size: 1.1rem;
    color: #333;
}

/* Classe cachant le loader */
.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}


/*Formulaire de contact*/

/* //////////////////////////////////////////////
Plus d'informations liées à la solution  : 
//////////////////////////////////////////////

https://www.zonecss.fr/faq/description-d-un-element.html#specifier-la-taille-d-un-element-grace-aux-feuilles-de-style-css

https://www.zonecss.fr/proprietes-css/box-sizing-css.html#WJwJqZ00000.codepen
*/

input[type=text],
textarea,
input[type=email] {
    width: 100%;
    padding: 12px;
    border: 0px;
    border-radius: 4px;
    background-color: #e0e0e0;
    margin-top: 6px;
    margin-bottom: 16px;
    margin-right: 0px;
    margin-left: 0px;
    resize: vertical;
}

label {
    margin-right: 0px;
    margin-left: 0px;
    width: 100%;
}

input[type=submit] {
    background-color: #1255a2;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #1872D9;
}

.container {
    /* Ajouter box-sizing */
    box-sizing: border-box;

    background-color: #f4f4f4;
    /* redéfinition 400 + 2*20 */
    max-width: 440px;
    padding: 2rem;
    margin-left: 1rem;
    margin-right: 1rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.container-contact {
    display: flex;
    justify-content: center;
}

/* Responsive pour mobile */
@media (min-width: 600px) {

    .footer-container {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        padding: 20px 0;
        transition: color 0.3s ease;
        list-style: none;
    }

    .SectionProjets {
        grid-template-columns: repeat(3, 1fr);
    }

}

.project-date {
    text-align: center;
    color: #555;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/*Page Affiche SABB*/
.projet-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/*CSS Boutons*/
.filtres {
    text-align: center;
    margin-bottom: 2rem;
}

.filtre-btn {
    background: #eee;
    border: none;
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background 0.3s;
}

.filtre-btn:hover {
    background: #ddd;
}

.filtre-btn.active {
    background: #333;
    color: #fff;
}

.projets-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.projet-card.hidden {
    display: none;
}

/*Page Affiche Eminem*/
/* ===== Galerie plein écran ===== */

.fullwidth-gallery h2 {
    text-align: center;
    margin: 2rem 0;
}

.fullwidth-gallery img {
    display: block;
    width: 100vw;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
}

ul {
    list-style: none;
    text-align: left;
}

.ul-auteurs {
    text-align: center;
}

section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    scroll-behavior: smooth;
}

p {
    text-align: justify;
    color: var(--text);
}

.text-center {
    text-align: center;
}

.link-box {
    display: flex;
    justify-content: center;
}

.link-box a {
    display: inline-block;
    /* pour que le cadre s'adapte au contenu */
    background: #f4f4f4;
    /* couleur de fond */
    padding: 12px 20px;
    /* espace intérieur */
    border: 2px solid #ccc;
    /* bordure */
    border-radius: 8px;
    /* coins arrondis */
    text-align: center;
    margin: 20px 0;
    /* espace au-dessus et en dessous */
    transition: background 0.3s ease, transform 0.3s ease;
}

.link-box a:hover {
    background: #e0e0e0;
    /* fond plus foncé au survol */
    transform: translateY(-3px);
    /* léger effet d'élévation */
}

.galerie-projet {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-items: center;
    gap: 1em;
}

.galerie-projet img {
    max-width: 100vh;
    width: 100%;
}

.galerie-projet video {
    max-width: 100vh;
    width: 100%;
}

@media (max-width: 768px) {
    .galerie-projet {
        display: grid;
        grid-template-columns: repeat(1, 2fr);
    }
}

/* Bouton dark mode */

/* ----- Bouton ----- */
#darkModeToggle {
    position: fixed;
    /* reste en haut à droite même en scrollant */
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background: #313131;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
    transition: background 0.3s;
}

#darkModeToggle:hover {
    background: #1b1b1b;
}

/* ----- Thème sombre ----- */
body.dark-mode {
    background-color: #1b1b1b;
    color: white;
}

/* Pour les liens dans le dark mode */
body.dark-mode a {
    color: white;
    /* bleu clair par exemple */
}

/* Exemple pour les inputs et textarea en mode sombre */
body.dark-mode input,
body.dark-mode textarea {
    background-color: #1b1b1b;
    color: white;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    /* espace entre les icônes */
    margin-top: 20px;
}

.icon-social svg {
    width: 50px;
    height: 50px;
    fill: #000;
    /* couleur normale */
    transition: fill 0.3s ease;
    cursor: pointer;
}

.icon-social:hover svg {
    fill: #ad1717;
    /* couleur au survol */
}

#contactSubmit {
    background: #0077ff;
    color: #fff;
    border: none;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

#contactSubmit:hover {
    transition: 300ms;
    background-color: rgb(0, 168, 0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

#contactSubmit:active {
    transform: translateY(-1px) scale(.995);
}

#contactSubmit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* état loading : ajoute une simple animation (tu peux personnaliser) */
#contactSubmit.loading {
    position: relative;
    color: #fff;
}

#contactSubmit.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skills-section {
    padding: 60px 0;
    max-width: 1100px;
    margin: auto;
}

.skills-section h2 {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 40px;
}

.skills-category {
    margin-bottom: 30px;
}

/* Style moderne des cartes */
.card {
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: 0.3s ease;
}

.skills-category h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--accent, #0077ff);
}

.skills-category ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.skills-category li {
    margin: 6px 0;
    font-size: 1rem;
    opacity: 0.9;
    padding-left: 14px;
    position: relative;
}

/* Petit bullet stylé */
.skills-category li::before {
    content: "•";
    color: var(--accent, #0077ff);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Responsive amélioré */
@media (min-width: 700px) {
    .skills-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }

    .skills-section h2 {
        grid-column: 1 / 3;
    }
}

@media (min-width: 1100px) {
    .skills-section {
        grid-template-columns: repeat(3, 1fr);
    }

    .skills-section h2 {
        grid-column: 1 / 4;
    }
}

.skills-logos img {
    height: 20px;
}

/* === CARROUSEL === */
/* --- CAROUSEL BASE --- */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 100vh;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    cursor:zoom-in;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- BOUTONS --- */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2.5;
    fill: none;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.85);
    transform: scale(1.1);
}

/* --- DOTS --- */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots .dot.active {
    background: rgba(255,255,255,1);
}

/* --- MOBILE ADJUST --- */
@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}


/* === LIGHTBOX === */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain; /* IMAGE ENTIÈRE */
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Bouton fermer */
.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    line-height: 1;
}
