/* =========================
   FONTS
========================= */
/* Koliko a été retirée : certains caractères accentués (É, È...) n'existaient
   pas dans cette police, ce qui rendait certains titres invisibles.
   Remplacée par Space Grotesk (chargée via Google Fonts dans index.html),
   qui couvre tous les accents français. */

/* =========================
   DESIGN TOKENS
========================= */

:root {
    /* Fond */
    --bg-0: #131316;
    --bg-1: #232327;
    --bg-2: #2f2f34;

    /* Verre */
    --glass-bg: rgba(255, 255, 255, 0.055);
    --glass-bg-hover: rgba(255, 255, 255, 0.095);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-border-hover: rgba(255, 255, 255, 0.3);

    /* Texte */
    --text: #f3f2ef;
    --text-muted: #a7a7ad;

    /* Accents */
    --accent: #8b7cff;
    --accent-2: #37e6d8;
    --accent-soft: rgba(139, 124, 255, 0.16);

    /* Typo */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    color: inherit;
}

a { text-decoration: none !important; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================
   BODY
========================= */

html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-body);

    background:
        radial-gradient(circle at 12% 8%, rgba(139, 124, 255, 0.16), transparent 42%),
        radial-gradient(circle at 88% 30%, rgba(55, 230, 216, 0.12), transparent 40%),
        linear-gradient(135deg, var(--bg-1) 0%, var(--bg-0) 55%, #0c0c0e 100%);
    background-attachment: fixed;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.01em; }

/* =========================
   GLASS EFFECT (base)
========================= */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass:hover {
    background: var(--glass-bg-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

/* =========================
   HEADER / NAV
========================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    transition: padding 0.4s ease, justify-content 0.4s ease;
}

/* Espaceur : compense le retrait du header du flux normal (position: fixed) */
.header-spacer { width: 100%; }

/* Au scroll : seule la pastille de navigation centrale reste visible, en position flottante */
@media (min-width: 761px) {
    .header.scrolled {
        justify-content: center;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .header.scrolled .leftheader,
    .header.scrolled .rightheader {
        opacity: 0;
        transform: scale(0.85);
        width: 0;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        overflow: hidden;
        pointer-events: none;
    }

    .header.scrolled .middleheader {
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    }
}

.leftheader a {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.leftheader,
.rightheader,
.middleheader ul li {
    padding: 12px 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.middleheader ul { display: flex; gap: 10px; }

.leftheader:hover,
.rightheader:hover,
.middleheader ul li:hover {
    transform: translateY(-3px);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.navlinks,
.leftheader a,
.rightheader a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.92rem;
    position: relative;
    transition: color 0.3s ease;
}

.navlinks.active {
    color: var(--accent-2);
}

.navtoggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
}

.navtoggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.navtoggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle.open span:nth-child(2) { opacity: 0; }
.navtoggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================
   HERO
========================= */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 110px 40px 90px;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    color: var(--accent-2);
    font-size: 0.85rem;
    margin-bottom: 14px;
    letter-spacing: 0.03em;
}

.mainTitre {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin-bottom: 34px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-text { flex: 1 1 420px; }

/* Buttons */

.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0c0c0e;
    box-shadow: 0 10px 30px rgba(139, 124, 255, 0.28);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(139, 124, 255, 0.4); }

.btn-ghost {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); transform: translateY(-2px); }

/* Terminal (élément signature) */

.terminal {
    flex: 1 1 380px;
    max-width: 440px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.terminal-body { padding: 20px 22px; line-height: 1.9; }

.prompt { color: var(--accent-2); margin-right: 8px; }

.terminal-output { color: var(--text-muted); margin-bottom: 6px; padding-left: 20px; }

.caret { animation: blink 1s steps(1) infinite; color: var(--accent-2); }

@keyframes blink { 50% { opacity: 0; } }

/* =========================
   SECTIONS (générique)
========================= */

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 90px 40px;
}

.section-head { margin-bottom: 46px; max-width: 640px; }

.eyebrow {
    font-family: var(--font-mono);
    color: var(--accent-2);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.section-title { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

.section-sub { color: var(--text-muted); margin-top: 12px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

/* Reveal on scroll */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================
   PRÉSENTATION
========================= */

.card {
    padding: 28px 26px;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-2);
    margin-bottom: 18px;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 1.05rem; margin-bottom: 10px; }

.card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

/* =========================
   PARCOURS (timeline)
========================= */

.timeline {
    position: relative;
    max-width: 760px;
    padding-left: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.timeline-item {
    position: relative;
    margin-bottom: 34px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35.5px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(55, 230, 216, 0.16);
}

.timeline-year {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--accent-2);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.timeline-content {
    padding: 20px 22px;
}

.timeline-content h3 { font-size: 1.02rem; margin-bottom: 8px; }

.timeline-content p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.timeline-future { opacity: 0.7; border-style: dashed; }

/* =========================
   PROJETS
========================= */

.projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.project-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }

.project-bar { padding: 10px 14px; }

.project-body { padding: 24px 24px 26px; }

.project-body h3 { font-size: 1.08rem; margin-bottom: 10px; }

.project-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.tags li {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, gap 0.25s ease;
}

.project-link:hover { border-color: var(--accent-2); gap: 10px; }

.project-card-future { opacity: 0.65; }

/* Pages projet individuelles */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.back-link:hover { text-decoration: underline !important; }

.project-page-tags { margin-top: 16px; }

.project-page-body { padding: 34px 36px; max-width: 760px; }

.project-page-body h2 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 26px;
    margin-bottom: 10px;
}

.project-page-body h2:first-child { margin-top: 0; }

.project-page-body p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 8px;
}

/* =========================
   COMPÉTENCES
========================= */

.skills-note { color: var(--text-muted); font-size: 0.78rem; margin-top: 16px; font-style: italic; }

.tool-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.tool-chip {
    padding: 10px 16px;
    font-size: 0.86rem;
    border-radius: 10px;
}

/* Lien vers la grille de compétences (PDF) */

/* Cards de compétences par catégorie */

.skills-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.skill-category { padding: 26px 24px; }

.skill-category h3 { font-size: 1.05rem; margin-bottom: 18px; }

.skill-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.skill-chip:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    color: var(--text);
}

.skill-chip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    padding: 3px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.92);
    flex-shrink: 0;
}

/* Grille officielle de compétences (E5) */

.competency-head { margin-top: 56px; margin-bottom: 20px; }

.competency-title { font-size: 1.2rem; }

.competency-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.competency-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.competency-table th,
.competency-table td {
    padding: 12px 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.competency-table thead th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.72rem;
    line-height: 1.4;
}

.competency-table thead th:first-child { text-align: left; }

.competency-table tbody td:first-child {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.competency-group td {
    background: rgba(139, 124, 255, 0.1);
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.competency-future td { color: var(--text-muted); font-style: italic; opacity: 0.6; }

.competency-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0 auto;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.competency-x:hover {
    background: var(--accent);
    color: #0c0c0e;
    transform: scale(1.1);
}

.competency-cta { display: inline-block; margin-top: 20px; }

/* =========================
   CERTIFICATIONS
========================= */

.certif-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.certif-card { padding: 24px; }

.certif-card h3 { font-size: 1.02rem; margin-bottom: 12px; }

.certif-meta { color: var(--text-muted); font-size: 0.84rem; margin-bottom: 4px; }

.certif-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

/* =========================
   CONTACT
========================= */

.contact-form { max-width: 640px; padding: 32px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }

.form-field label { font-size: 0.84rem; color: var(--text-muted); font-family: var(--font-mono); }

.form-field input,
.form-field textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: var(--font-body);
    color: var(--text);
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid var(--accent-2);
    outline-offset: 1px;
    border-color: var(--accent-2);
}

.form-feedback { margin-top: 14px; font-size: 0.86rem; color: var(--accent-2); min-height: 1.2em; }

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

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin: 40px;
    border-radius: 18px;
}

.footer.glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.leftfooter,
.rightfooter a {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.25s ease, background 0.25s ease;
}

.leftfooter { display: flex; justify-content: center; align-items: center; text-align: center; }

.rightfooter { display: flex; gap: 10px; }

.leftfooter:hover,
.rightfooter a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }

.logo { height: 20px; width: 20px; }

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

@media (max-width: 900px) {
    .hero { flex-direction: column; padding-top: 70px; }
}

@media (max-width: 760px) {
    .header { padding: 16px 20px; }
    .navtoggle { display: flex; }

    .middleheader {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 10px;
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .middleheader.open { max-height: 400px; }

    .middleheader ul {
        flex-direction: column;
        gap: 8px;
        background: rgba(19, 19, 22, 0.9);
        backdrop-filter: blur(20px);
        border-radius: 14px;
        padding: 12px;
    }

    .rightheader { display: none; }

    .section { padding: 60px 20px; }

    .project-page-body { padding: 24px 22px; }

    .form-row { grid-template-columns: 1fr; }
}
