/* =======================================================================================
  GLOBAL STYLES
======================================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Scroll doux sur les ancres */
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050816; /* Fond général du site */
    color: #f5f5f5; /* Texte principal */
    line-height: 1.6;
}

.section h2 {
    text-align: center;
}

a {
    text-decoration: none;
}

/* =======================================================================================
   VARIABLES CSS
======================================================================================= */
:root {
    --bg-main: #050816;
    --bg-section: #0b1020;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-soft: rgba(148, 163, 184, 0.3);
    --radius: 16px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
}

/* =======================================================================================
   UTILITAIRES
======================================================================================= */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

/* =======================================================================================
   NAVBAR + HEADER
======================================================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 8, 22, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

/* Contenu du header aligné avec le reste du site */
.header-inner {
    max-width: 1100px;          /* même largeur que .container si tu l'utilises */
    margin: 0 auto;
    padding: 0 1.5rem;          /* même padding horizontal que le reste du layout */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    width: 100%;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer; /* pour montrer que c'est cliquable */
}

.logo-init {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0%, var(--accent-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.05em;
}

.logo:hover .logo-text {
    color: var(--accent-light);
}

/* NAVBAR */
.navbar {
    display: flex;
    margin-bottom: auto;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding-top: 1.7rem;
}


/* =======================================================================================
   BOUTONS
======================================================================================= */
.btn-primary {
    background: linear-gradient(135deg, #6165f1, #8f92ff);
    color: #fff;
    padding: 0.55rem 1.2rem;
    border-radius: 99px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.6);
}

.btn-secondary {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-size: 1.1rem;
    color: #c7c9ff;
    border: 1px solid #8183ff;
    background: rgba(129, 131, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(129, 131, 255, 0.25);
    transform: translateY(-2px);
}

/* Version compacte pour navbar */
.nav-btn {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    box-shadow: none;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
}

/* =======================================================================================
   BURGER MENU
======================================================================================= */
.burger {
    width: 32px;
    height: 24px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.burger span {
    height: 3px;
    width: 100%;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s ease;
}

.burger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* =======================================================================================
   SECTION PRÉSENTATION
======================================================================================= */
.section-presentation {
    padding-top: 5rem;
}

.section-presentation .container {
    display: flex;
    flex-direction: row-reverse;   /* inverse l’ordre */
    align-items: center;
    gap: 2rem;
}

.section-presentation .container {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.presentation-text h1 {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    margin-bottom: 0.75rem;
}

.presentation-text h2 {
    font-size: 1.2rem;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.presentation-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 520px;
}

.presentation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.presentation-tags span {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Photo */
.presentation-photo img {
    width: 260px;
    max-width: 100%;
    border-radius: 1000px;
    border: 2px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* =======================================================================================
   SECTION CV
======================================================================================= */
.section-cv {
    background: var(--bg-section);
}

.cv-grid {
    display: flex;
    justify-content: center;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.cv-column {
    max-width: 680px;
    padding: 2rem 1.5rem;
    margin: 0 auto;
}

.cv-column h3 {
    margin-bottom: 0.75rem;
}

.cv-column p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Carte visuelle de CV (comme une cert-card) */
.cv-preview {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.2rem;
}

.cv-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(129, 131, 255, 0.45);
    box-shadow: 0 0 20px rgba(129, 131, 255, 0.1);
    padding: 1rem 1.25rem;
    transition: 0.25s ease;
    justify-content: center;
}

/* Aperçu d’un CV dans la carte */
.cv-preview {
    width: 80%; /* ou 100% si tu veux */
    max-width: 280px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.9);
}

.cv-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Titres & textes dans les cartes CV */
.cv-title {
    font-size: 1.05rem;
    margin-top: 0.25rem;
}

.cv-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* =======================================================================================
   CERTIFICATIONS
======================================================================================= */
.section-certifications {
    background: var(--bg-main);
}

/* Liste : une colonne verticale */
#certifications-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* Carte de certification */
.cert-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.6rem 2rem 2rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;   /* centre tout le contenu */
    text-align: center;
    gap: 0.4rem;
}

.cert-card:hover {
    border-color: rgba(129, 131, 255, 0.7);
    box-shadow: 0 0 30px rgba(129, 131, 255, 0.25);
    transform: translateY(-2px);
}

/* Logo / image de la certif */
.cert-logo {
    margin-bottom: 0.9rem;
}

.cert-logo img {
    max-width: 100%px;   /* taille de l’image */
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Titres & infos */
.cert-card h3 {
    font-size: 1.05rem;
}

.cert-issuer,
.cert-year {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cert-card .btn-secondary {
    align-self: center;
    margin-top: 1rem;
}

.cert-hidden {
    display: none;
}

.cert-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}


/* =======================================================================================
   PROJETS
======================================================================================= */
.section-projets {
    background: var(--bg-section);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1.75rem;
}

/* Cacher les projets masqués */
.project-hidden {
    display: none;
}

/* Bouton Voir plus des projets */
.projects-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Carte projet */
.project-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    padding: 1.1rem 1.2rem 1.1rem;
}


.project-carousel {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    margin-bottom: 1rem;
}

/* Bande d’images */
.project-carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Chaque image prend toute la place */
.project-carousel-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

/* Boutons précédent / suivant */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Corps de la carte (texte + techs + boutons) */
.project-card-body {
    padding: 1.1rem 0.2rem 0;
    display: flex;
    flex-direction: column;
    flex: 1;            /* étire le body dans la carte */
}

/* Titre du projet */
.project-card-title {
    margin-bottom: 0.4rem;
}

/* Description */
.project-card-desc {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    min-height: 150px;
}

/* Ligne des technos */
.project-card-techs {
    font-size: 0.9rem;
    color: var(--accent-light);
    margin-bottom: 1.1rem;
}

/* Zone des boutons (GitHub / Démo) */
.project-card-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: auto;
    padding-top: 0.4rem;
    padding-bottom: 0;
}

/* Espacement des boutons eux-mêmes, même s'il n'y en a qu'un */
.project-card-links > * {
    margin: 0 0.6rem;
}


#btn-voir-projets {
    display: block;
    margin: 1.8rem auto 0 auto;
}


/* ==========================
   MODAL PROJET (plein écran)
========================== */
.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.project-modal.active {
    display: flex;
}

.project-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #050816;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 0.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-modal-img-wrapper {
    max-width: 100%;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 10px;
}

.project-modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-modal-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Boutons du modal */
.project-modal-close,
.project-modal-prev,
.project-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(252, 251, 251);
    border: none;
    color: #000;
    padding: 0.50rem 0.40rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.5rem;
}

.project-modal-close {
    top: 10px;
    right: 10px;
    transform: none;
}

.project-modal-prev {
    left: 20px;
}

.project-modal-next {
    right: 20px;
}


/* =======================================================================================
   CONTACT
======================================================================================= */
.section-contact {
    background: var(--bg-main);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contact-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-soft);
}

.contact-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.contact-info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.contact-info li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.contact-label {
    min-width: 90px;
    font-weight: 500;
    color: var(--text-muted);
}

#contact-email a {
    color: var(--accent-light);
    text-decoration: none;
}

#contact-email a:hover {
    text-decoration: underline;
}

.contact-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.contact-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Boutons réseaux sociaux */
.contact-social {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #8183ff;
    background: rgba(129, 131, 255, 0.15);
    color: #c7c9ff;
    text-decoration: none;
    font-size: 1rem; /* texte plus gros */
    transition: 0.2s ease;
}

.contact-social:hover {
    background: rgba(129, 131, 255, 0.25);
    transform: translateY(-2px);
}

.contact-social-icon {
    width: 26px;      /* icône plus grande */
    height: 26px;
    object-fit: contain;
    display: block;
}



/* =======================================================================================
   FOOTER
======================================================================================= */
.footer {
    border-top: 1px solid var(--border-soft);
    padding: 1.5rem 0;
    color: var(--text-muted);
    text-align: center; /* <-- centrage du texte */
}
.footer a {
    color: var(--accent-light);
    text-decoration: none;
}

/* =======================================================================================
   RESPONSIVE (tablette)
======================================================================================= */
@media (max-width: 900px) {

    /* Projets : 1 carte par ligne */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* CV : 1 carte par ligne */
    .cv-grid {
        grid-template-columns: 1fr;
    }

    /* Contact : 1 colonne */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* =======================================================================================
   RESPONSIVE (mobile moyen)
======================================================================================= */
@media (max-width: 768px) {

    .header-inner {
        gap: 0.5rem;
    }

    .section-presentation .container {
        flex-direction: column;
    }

    .burger {
        display: flex;
    }

    /* NAVBAR : menu déroulant sous le header */
    .navbar {
        position: absolute;
        top: 64px; /* juste sous le header */
        left: 0;
        width: 100%;
        background: rgba(5, 8, 22, 0.95);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border-soft);
        padding: 1.2rem 0;
        flex-direction: column;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: 0.35s ease;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    }

    .navbar.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .navbar ul {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
        align-items: center;
    }

    .nav-btn {
        font-size: 1rem !important;
        box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45) !important;
    }

    /* Présentation : une seule colonne */
    .section-presentation .container {
        grid-template-columns: 1fr;
    }

    .presentation-photo img {
        margin: 1.5rem auto 0;
    }

    /* Bouton Voir plus certifications centré */
    .cert-actions {
        margin-top: 1.5rem;
        display: flex;
        justify-content: center;
        gap: 0.75rem;
    }

    /* CV : centrage du contenu */
    .cv-grid {
        grid-template-columns: 1fr;
    }

    .cv-column {
        text-align: center;
    }

    .cv-preview {
        margin-left: auto;
        margin-right: auto;
    }
}

/* =======================================================================================
   RESPONSIVE (petit mobile)
======================================================================================= */
@media (max-width: 600px) {

    /* Projets : une seule colonne (redondant mais safe) */
    .projects-grid {
        grid-template-columns: 1fr;
    }
}