/* =========================================
   VARIABLES
   ========================================= */
:root {
    --accent:      #e8620c;
    --accent-soft: rgba(232, 98, 12, 0.10);
    --accent-mid:  rgba(232, 98, 12, 0.22);
    --accent-glow: rgba(232, 98, 12, 0.18);

    --bg:          #fafaf8;
    --bg-alt:      #f2f1ee;
    --bg-card:     #ffffff;
    --bg-nav:      rgba(250, 250, 248, 0.92);

    --text:        #111111;
    --muted:       #6b6b6b;
    --faint:       #b5b5b5;

    --border:      #e4e4e1;
    --border-dark: #ccccca;

    --sh-sm: 0 1px 6px rgba(0,0,0,0.05), 0 2px 12px rgba(0,0,0,0.04);
    --sh-md: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --sh-lg: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);

    --font:   'DM Sans', sans-serif;
    --font-h: 'Urbanist', sans-serif;

    --r:    14px;
    --r-sm: 8px;
    --ease: 0.22s ease;
}

body.dark {
    --bg:      #0c0c0b;
    --bg-alt:  #141413;
    --bg-card: #1a1918;
    --bg-nav:  rgba(12, 12, 11, 0.92);

    --text:   #f0ede8;
    --muted:  #888;
    --faint:  #404040;

    --border:      #2a2926;
    --border-dark: #363432;

    --sh-sm: 0 1px 6px rgba(0,0,0,0.4);
    --sh-md: 0 4px 20px rgba(0,0,0,0.5);
    --sh-lg: 0 16px 48px rgba(0,0,0,0.6);
}

/* =========================================
   RESET
   ========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background .35s, color .35s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }

/* =========================================
   FOND — GRILLE + ZONES DIAGONALES
   ========================================= */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Grille de lignes nette et bien visible */
.bg-orbs::before {
    content: '';
    position: absolute;
    inset: -100px; /* déborde pour éviter les bords blancs */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 52px 52px;
    animation: gridDrift 40s linear infinite;
}

/* Zone colorée haut-droit — coin en biseau */
.bg-orbs::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 55vw; height: 60vh;
    background: linear-gradient(
        215deg,
        rgba(232, 98, 12, 0.13) 0%,
        rgba(251, 146, 60, 0.07) 35%,
        transparent 65%
    );
    clip-path: polygon(100% 0%, 0% 0%, 100% 100%);
}

/* Zone colorée bas-gauche */
.orb-1 {
    position: absolute;
    bottom: 0; left: 0;
    width: 45vw; height: 50vh;
    background: linear-gradient(
        35deg,
        rgba(232, 98, 12, 0.10) 0%,
        rgba(251, 146, 60, 0.05) 40%,
        transparent 70%
    );
    clip-path: polygon(0% 100%, 100% 100%, 0% 0%);
}

/* Masquage des autres orbs non utilisées */
.orb-2, .orb-3 { display: none; }

:root {
    --grid-line: rgba(232, 98, 12, 0.12);
}
body.dark {
    --grid-line: rgba(232, 98, 12, 0.16);
}
body.dark .bg-orbs::after {
    background: linear-gradient(
        215deg,
        rgba(232, 98, 12, 0.18) 0%,
        rgba(251, 146, 60, 0.10) 35%,
        transparent 65%
    );
}
body.dark .orb-1 {
    background: linear-gradient(
        35deg,
        rgba(232, 98, 12, 0.14) 0%,
        rgba(251, 146, 60, 0.07) 40%,
        transparent 70%
    );
}

@keyframes gridDrift {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 52px 52px, 52px 52px; }
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1010;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 6%;
    transition: padding .3s ease, box-shadow .3s ease;
    background: var(--bg-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.navbar.scrolled {
    padding: 13px 6%;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-sm);
}

.logo {
    font-family: var(--font-h);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.logo .dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
    padding: 7px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    border-radius: 30px;
    transition: var(--ease);
}
.nav-links a:hover, .nav-links a.active-nav {
    color: var(--text);
    background: var(--bg-alt);
}

.nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 7px 18px !important;
    font-weight: 600 !important;
}
.nav-cta:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }

.theme-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid var(--border); background: transparent;
    color: var(--muted); display: flex; align-items: center; justify-content: center;
    font-size: .85rem; transition: var(--ease); margin-left: 6px;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-dark); }

/* =========================================
   HERO
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 130px 6% 60px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 80px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

/* Tag "disponible" */
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 600;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 5px 13px;
    border-radius: 30px;
    margin-bottom: 24px;
    box-shadow: var(--sh-sm);
    letter-spacing: .01em;
}
.tag-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e;
    animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.hero-text h1 {
    font-family: var(--font-h);
    font-size: clamp(3.2rem, 5.8vw, 5.4rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 20px;
}
.hero-text h1 .accent { color: var(--accent); }

.hero-sub {
    font-size: .95rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 22px;
    letter-spacing: .01em;
}

.hero-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 510px;
    margin-bottom: 36px;
}
.hero-desc strong { color: var(--text); font-weight: 600; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; font-size: .9rem; font-weight: 600;
    border-radius: 30px; border: none;
    transition: var(--ease); cursor: pointer; white-space: nowrap;
    font-family: var(--font);
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: #d4560a; transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border-dark); }
.btn-ghost:hover { background: var(--bg-alt); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; border-radius: var(--r-sm); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

/* Social chips */
.hero-social {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.social-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px; font-size: .82rem; font-weight: 500;
    color: var(--muted); border: 1.5px solid var(--border);
    border-radius: 30px; transition: var(--ease);
}
.social-chip:hover {
    color: var(--text); border-color: var(--border-dark);
    transform: translateY(-2px); box-shadow: var(--sh-sm);
}
.social-chip i { font-size: .9rem; }

/* Photo — propre, sans badges */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.photo-frame { position: relative; display: inline-block; }
.photo-frame::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 27px;
    background: linear-gradient(135deg, var(--accent) 0%, rgba(232,98,12,0.3) 50%, transparent 80%);
    z-index: 0;
}
.photo-frame img {
    position: relative; z-index: 1;
    width: 340px; height: 400px;
    object-fit: cover;
    border-radius: 24px;
    display: block;
    box-shadow: var(--sh-lg);
    transition: transform .3s ease;
}
.photo-frame:hover img { transform: scale(1.02); }

/* Bande stats */
.stats-strip {
    display: flex; align-items: center; justify-content: center;
    gap: 0;
    max-width: 680px;
    margin: 64px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 28px 40px;
    box-shadow: var(--sh-sm);
}
.stat-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; flex: 1;
    text-align: center;
}
.stat-num {
    font-family: var(--font-h);
    font-size: 2rem; font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.03em;
    line-height: 1;
}
.stat-num small { font-size: 1rem; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.stat-div {
    width: 1px; height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

/* =========================================
   SECTIONS
   ========================================= */
.section { padding: 100px 6%; }
.section-alt { background: var(--bg-alt); }

.section-label {
    display: block;
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--accent); margin-bottom: 10px;
}
.section-heading {
    font-family: var(--font-h);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 52px;
    line-height: 1.1;
}
.section-sub {
    font-size: 1rem; color: var(--muted);
    max-width: 500px; margin-bottom: 52px;
    line-height: 1.75;
}

/* =========================================
   TIMELINE
   ========================================= */
.timeline {
    max-width: 820px;
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 119px; top: 0; bottom: 0;
    width: 1px;
    background: var(--border);
}

.tl-item {
    display: grid;
    grid-template-columns: 120px 58px 1fr;
    align-items: flex-start;
    padding-bottom: 32px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-left { padding-top: 18px; }
.tl-date {
    font-size: .75rem; font-weight: 600;
    color: var(--faint); letter-spacing: .02em;
    white-space: nowrap;
}

.tl-connector {
    display: flex; justify-content: center;
    padding-top: 15px; position: relative;
}
.tl-dot {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: .78rem;
    z-index: 1; flex-shrink: 0;
    transition: var(--ease); box-shadow: var(--sh-sm);
}

.tl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px 24px;
    margin-left: 14px;
    transition: var(--ease);
}
.tl-card:hover {
    border-color: var(--border-dark);
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
}
.tl-item:hover .tl-dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.tl-company {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    font-size: .8rem; color: var(--muted); margin-bottom: 5px;
}
.tl-company i { color: var(--accent); font-size: .78rem; }
.tl-badge {
    font-size: .68rem; font-weight: 700; padding: 2px 8px;
    border-radius: 20px; background: var(--accent-soft);
    color: var(--accent); border: 1px solid var(--accent-mid);
}

.tl-card h3 {
    font-family: var(--font-h);
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin-bottom: 8px;
    letter-spacing: -.01em;
}
.tl-card p { font-size: .875rem; color: var(--muted); line-height: 1.7; margin-bottom: 13px; }

.tl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tl-tags span {
    font-size: .7rem; padding: 2px 9px;
    border-radius: 20px;
    background: var(--bg-alt);
    color: var(--muted); border: 1px solid var(--border);
}

/* =========================================
   SKILLS
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1100px;
}

.skill-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 28px;
    transition: var(--ease);
}
.skill-block:hover { border-color: var(--border-dark); box-shadow: var(--sh-md); transform: translateY(-3px); }

.skill-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; margin-bottom: 18px;
}
.skill-icon.net  { background: rgba(232,98,12,.1);  color: var(--accent); border: 1px solid var(--accent-mid); }
.skill-icon.sec  { background: rgba(99,102,241,.1); color: #6366f1;        border: 1px solid rgba(99,102,241,.2); }
.skill-icon.dev  { background: rgba(20,184,166,.1); color: #0d9488;        border: 1px solid rgba(20,184,166,.2); }

.skill-block h3 {
    font-family: var(--font-h);
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin-bottom: 16px;
    letter-spacing: -.01em;
}
.skill-list { display: flex; flex-direction: column; gap: 9px; }
.skill-list li {
    display: flex; align-items: center; gap: 10px;
    font-size: .875rem; color: var(--muted);
}
.skill-list li i { color: var(--accent); font-size: .65rem; flex-shrink: 0; }

/* =========================================
   PROJECT CARDS
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1100px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 24px;
    display: flex; flex-direction: column; gap: 14px;
    transition: var(--ease);
}
.project-card:hover { border-color: var(--border-dark); box-shadow: var(--sh-md); transform: translateY(-3px); }

.project-meta { display: flex; align-items: center; justify-content: space-between; }
.project-tag {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent);
    background: var(--accent-soft); border: 1px solid var(--accent-mid);
    padding: 3px 10px; border-radius: 20px;
}
.project-icons { display: flex; gap: 7px; }
.project-icons span, .project-icons a {
    width: 28px; height: 28px; border-radius: 7px;
    border: 1px solid var(--border); background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: .82rem; transition: var(--ease);
}
.project-icons a:hover { color: var(--text); border-color: var(--border-dark); }

.project-card h3 {
    font-family: var(--font-h);
    font-size: 1rem; font-weight: 700;
    color: var(--text); line-height: 1.3;
    letter-spacing: -.01em;
}
.project-card > p { font-size: .875rem; color: var(--muted); line-height: 1.7; flex: 1; }

.project-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
}
.project-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.project-chips span {
    font-size: .68rem; padding: 2px 8px;
    border-radius: 20px; background: var(--bg-alt);
    color: var(--muted); border: 1px solid var(--border);
}

.btn-text {
    background: none; border: none;
    font-size: .82rem; font-weight: 600;
    color: var(--accent); display: inline-flex;
    align-items: center; gap: 5px; cursor: pointer;
    padding: 0; white-space: nowrap;
    transition: var(--ease); font-family: var(--font);
}
.btn-text:hover { gap: 9px; }

/* =========================================
   SIDE PROJECTS
   ========================================= */
.side-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1100px;
}

.side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 22px;
    display: flex; flex-direction: column; gap: 11px;
    transition: var(--ease);
}
.side-card:hover { border-color: var(--border-dark); box-shadow: var(--sh-md); transform: translateY(-3px); }

.side-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.side-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.side-icon.tech   { background: rgba(99,102,241,.1);  color: #6366f1; border: 1px solid rgba(99,102,241,.2); }
.side-icon.sport  { background: rgba(34,197,94,.1);   color: #16a34a; border: 1px solid rgba(34,197,94,.2);  }
.side-icon.music  { background: rgba(236,72,153,.1);  color: #db2777; border: 1px solid rgba(236,72,153,.2); }
.side-icon.gaming { background: rgba(245,158,11,.1);  color: #d97706; border: 1px solid rgba(245,158,11,.2); }

.side-links { display: flex; gap: 6px; }
.side-links a {
    width: 27px; height: 27px; border-radius: 7px;
    border: 1px solid var(--border); background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: .78rem; transition: var(--ease);
}
.side-links a:hover { color: var(--text); border-color: var(--border-dark); }

.side-card h3 {
    font-family: var(--font-h);
    font-size: .95rem; font-weight: 700;
    color: var(--text); letter-spacing: -.01em;
}
.side-card > p { font-size: .82rem; color: var(--muted); line-height: 1.65; flex: 1; }

/* =========================================
   CERTIFICATIONS
   ========================================= */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 1100px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 26px;
    display: flex; flex-direction: column; gap: 13px;
    transition: var(--ease);
}
.cert-card:hover { border-color: var(--border-dark); box-shadow: var(--sh-md); transform: translateY(-2px); }

.cert-header { display: flex; align-items: center; justify-content: space-between; }
.cert-org {
    font-size: .72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .12em; color: var(--accent);
}
.cert-date { font-size: .76rem; color: var(--faint); }
.cert-live {
    display: flex; align-items: center; gap: 5px;
    font-size: .74rem; font-weight: 600; color: #16a34a;
}
.cert-live i { font-size: .5rem; }

.cert-card h3 {
    font-family: var(--font-h);
    font-size: 1.05rem; font-weight: 700;
    color: var(--text); letter-spacing: -.01em;
}
.cert-card > p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* Score bars */
.cert-scores { display: flex; flex-direction: column; gap: 9px; }
.score-row {
    display: grid;
    grid-template-columns: 1fr 90px 34px;
    align-items: center; gap: 10px;
}
.score-row span { font-size: .78rem; color: var(--muted); }
.score-row b { font-size: .78rem; font-weight: 700; color: var(--text); text-align: right; }
.score-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.score-fill {
    height: 100%; width: var(--w);
    background: linear-gradient(90deg, var(--accent), #fb923c);
    border-radius: 2px;
    transform: scaleX(0); transform-origin: left;
    animation: grow 1s cubic-bezier(.4,0,.2,1) forwards;
    animation-play-state: paused;
}
@keyframes grow { to { transform: scaleX(1); } }
.score-fill.animated { animation-play-state: running; }

.cert-badge-wrap { display: flex; justify-content: center; padding: 8px 0; }
.cert-badge-wrap img {
    width: 108px; height: 108px; object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
    transition: var(--ease);
}
.cert-badge-wrap img:hover { transform: scale(1.07) rotate(-3deg); }

.thm-container { display: flex; justify-content: center; overflow: hidden; margin: 4px 0; }
.thm-container iframe { border: none; width: 450px; height: 220px; }

.pix-score-wrap { display: flex; justify-content: center; padding: 14px 0; }
.pix-ring {
    width: 96px; height: 96px; border-radius: 50%;
    border: 2.5px solid var(--accent);
    background: var(--accent-soft);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: var(--ease);
}
.pix-ring:hover { transform: scale(1.08); box-shadow: 0 0 0 6px var(--accent-soft); }
.pix-num {
    font-family: var(--font-h);
    font-size: 1.55rem; font-weight: 900;
    color: var(--accent); line-height: 1;
}
.pix-sub {
    font-size: .62rem; text-transform: uppercase;
    letter-spacing: .12em; color: var(--muted); margin-top: 3px;
}
.cert-btn { margin-top: auto; align-self: flex-start; }

/* =========================================
   CONTACT
   ========================================= */
.contact-section .section-heading { margin-bottom: 0; }
.contact-section .section-sub { margin-top: 14px; }

.contact-wrap {
    display: grid; grid-template-columns: 320px 1fr;
    gap: 48px; max-width: 980px; align-items: flex-start;
}
.contact-info h3 {
    font-family: var(--font-h);
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin-bottom: 16px;
    letter-spacing: -.01em;
}
.avail-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 28px; }
.avail-list li {
    display: flex; align-items: flex-start; gap: 11px;
    font-size: .875rem; color: var(--muted); line-height: 1.5;
}
.avail-list li i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

.contact-links { display: flex; flex-direction: column; gap: 9px; }
.contact-link {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 16px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    transition: var(--ease); color: var(--text);
}
.contact-link:hover { border-color: var(--border-dark); box-shadow: var(--sh-sm); transform: translateX(4px); }
.contact-link > i { font-size: 1.15rem; color: var(--accent); flex-shrink: 0; }
.contact-link div { display: flex; flex-direction: column; }
.contact-link span { font-size: .875rem; font-weight: 600; color: var(--text); }
.contact-link small { font-size: .76rem; color: var(--muted); margin-top: 1px; }

/* Form */
.contact-form {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r); padding: 30px;
    display: flex; flex-direction: column; gap: 17px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
    font-size: .8rem; font-weight: 600;
    color: var(--text); letter-spacing: .01em;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 10px 13px;
    background: var(--bg-alt);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text); font-family: var(--font); font-size: .9rem;
    transition: var(--ease); outline: none;
    -webkit-appearance: none; appearance: none;
}
.contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23999' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
    cursor: pointer;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* =========================================
   FOOTER
   ========================================= */
footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 6%;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: .8rem; color: var(--faint);
}
.footer-links { display: flex; gap: 14px; }
.footer-links a { font-size: 1.05rem; color: var(--faint); transition: var(--ease); }
.footer-links a:hover { color: var(--text); }

/* =========================================
   MODALES
   ========================================= */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 38px;
    width: 100%; max-width: 620px;
    max-height: 88vh; overflow-y: auto;
    position: relative;
    transform: translateY(16px) scale(.98);
    opacity: 0;
    transition: transform .32s cubic-bezier(.16,1,.3,1), opacity .3s ease;
    box-shadow: var(--sh-lg);
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); opacity: 1; }

.modal-box::-webkit-scrollbar { width: 3px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 2px; }

.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border); background: transparent;
    color: var(--muted); display: flex; align-items: center; justify-content: center;
    font-size: .82rem; transition: var(--ease);
}
.modal-close:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border-dark); }

.modal-label {
    display: inline-block;
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--accent); background: var(--accent-soft);
    border: 1px solid var(--accent-mid);
    padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
}
.modal-box > h2 {
    font-family: var(--font-h);
    font-size: 1.5rem; font-weight: 800;
    color: var(--text); letter-spacing: -.02em; margin-bottom: 5px;
}
.modal-sub {
    font-size: .86rem; color: var(--muted); font-style: italic;
    margin-bottom: 26px; padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}


/* =========================================
   GALERIE DE PREUVES
   ========================================= */
.proof-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}
.proof-fig {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.proof-fig img {
    width: 100%;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: var(--ease);
}
.proof-fig img:hover {
    border-color: var(--accent);
    box-shadow: var(--sh-md);
}
.proof-fig figcaption {
    font-size: .72rem;
    color: var(--muted);
    line-height: 1.4;
    font-style: italic;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    cursor: zoom-out;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.lightbox-overlay.open { opacity: 1; pointer-events: all; }
.lightbox-overlay img {
    max-width: 92vw; max-height: 88vh;
    border-radius: var(--r-sm);
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    object-fit: contain;
}
@media (max-width: 580px) {
    .proof-gallery { grid-template-columns: 1fr; }
}

.modal-section { margin-bottom: 18px; }
.modal-section h4 {
    font-family: var(--font-h);
    font-size: .83rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); margin-bottom: 9px;
}
.modal-section p { font-size: .9rem; color: var(--muted); line-height: 1.75; }
.modal-section ul { display: flex; flex-direction: column; gap: 8px; }
.modal-section ul li {
    font-size: .875rem; color: var(--muted); line-height: 1.6;
    padding-left: 16px; position: relative;
}
.modal-section ul li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: .8rem; }
.modal-section strong { color: var(--text); font-weight: 600; }

.modal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.modal-chips span {
    font-size: .74rem; padding: 3px 11px;
    border-radius: 20px; background: var(--bg-alt);
    border: 1px solid var(--border); color: var(--muted);
}

.modal-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    padding-top: 18px; border-top: 1px solid var(--border);
}

.modal-quote {
    margin-top: 14px; padding: 14px 18px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: .875rem; font-style: italic;
    color: var(--muted); line-height: 1.65;
}

/* =========================================
   BARRE DE PROGRESSION LECTURE
   ========================================= */
.reading-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #fb923c);
    width: 0%;
    z-index: 1100;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   BOUTON RETOUR EN HAUT
   ========================================= */
.back-top {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--muted);
    font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--sh-md);
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, color .2s, border-color .2s;
    pointer-events: none;
}
.back-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.back-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================
   SECTION À PROPOS
   ========================================= */
.about-section { background: var(--bg); }

.about-inner {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 64px;
    align-items: flex-start;
    max-width: 1100px;
}

.about-text .section-heading { margin-bottom: 26px; }

.about-text p {
    font-size: .975rem;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 16px;
    max-width: 560px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-aside {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 62px; /* aligne avec le texte (après label + heading) */
}

.about-card {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: var(--ease);
}
.about-card:hover {
    border-color: var(--border-dark);
    transform: translateX(4px);
    box-shadow: var(--sh-sm);
}
.about-card > i {
    color: var(--accent);
    font-size: .95rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.about-card div {
    display: flex; flex-direction: column; gap: 2px;
}
.about-card span {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--faint);
}
.about-card strong {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
}

/* =========================================
   REVEAL
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   BURGER
   ========================================= */
.burger {
    display: none; flex-direction: column;
    gap: 5px; padding: 4px; cursor: pointer;
}
.burger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: var(--ease);
}
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1080px) {
    .side-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
    /* ── Hero ── */
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-text  { order: 2; }
    .hero-visual { order: 1; }
    .hero-desc { margin: 0 auto 32px; }
    .hero-actions, .hero-social { justify-content: center; }
    .photo-frame img { width: 220px; height: 260px; }

    /* ── À propos ── */
    .about-inner { grid-template-columns: 1fr; gap: 32px; }
    .about-aside { padding-top: 0; }
    .about-text p { max-width: 100%; }

    /* ── Timeline : dot + carte ── */
    .timeline::before { left: 19px; }
    .tl-item { grid-template-columns: 40px 1fr; gap: 0; }
    .tl-left { display: none; }
    .tl-connector { padding-top: 16px; justify-content: flex-start; }
    .tl-dot { width: 28px; height: 28px; font-size: .68rem; flex-shrink: 0; }
    .tl-card { margin-left: 14px; padding: 16px 18px; }

    /* ── Grilles ── */
    .skills-grid, .projects-grid { grid-template-columns: 1fr; }
    .certs-grid { grid-template-columns: 1fr; }
    .contact-wrap { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    /* ─────────────────────────────────
       NAV MOBILE
       La navbar elle-même passe plein
       écran quand .menu-open — évite
       tout conflit de stacking context.
    ───────────────────────────────── */
    .burger { display: flex; }

    /* nav-links caché par défaut */
    .nav-links {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    /* Navbar normale sur mobile */
    .navbar {
        flex-wrap: nowrap;
        align-items: center;
    }

    /* Navbar en mode menu ouvert = plein écran */
    .navbar.menu-open {
        height: 100dvh; /* dynamic viewport height — évite les bugs iOS */
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 20px 6%;
        overflow-y: auto;
        border-bottom: none;
        box-shadow: none;
    }

    /* Dans menu-open : logo + burger restent sur la 1ère ligne */
    .navbar.menu-open .logo,
    .navbar.menu-open .burger { flex-shrink: 0; }

    /* Ligne du haut logo/burger en mode ouvert */
    .navbar.menu-open::before {
        content: '';
        display: none; /* pas nécessaire, juste pour clarté */
    }

    /* nav-links visible quand menu ouvert */
    .navbar.menu-open .nav-links {
        display: flex;
        opacity: 1;
        pointer-events: all;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        flex: 1;
        justify-content: center;
        padding: 0;
        margin-top: 0;
    }

    /* Items */
    .nav-links li {
        width: 100%;
        max-width: 300px;
    }
    .nav-links a {
        display: block;
        width: 100%;
        font-size: 1.05rem;
        font-weight: 500;
        padding: 13px 20px;
        border-radius: var(--r-sm);
        color: var(--muted);
        text-align: center;
        background: transparent;
    }
    .nav-links a:hover,
    .nav-links a.active-nav { color: var(--text); background: var(--bg-alt); }

    /* CTA Contact */
    .nav-cta {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        background: var(--accent) !important;
        color: #fff !important;
        border-radius: var(--r-sm) !important;
        padding: 13px 20px !important;
        margin-top: 4px;
        font-weight: 600 !important;
    }
    .nav-cta:hover { opacity: .9 !important; transform: none !important; box-shadow: none !important; }

    /* Bouton thème */
    .nav-links li:last-child {
        display: flex;
        justify-content: center;
        margin-top: 8px;
    }
    .theme-btn { width: 42px; height: 42px; font-size: .9rem; }

    .back-top { bottom: 20px; right: 16px; width: 38px; height: 38px; }

    /* Sécurité débordement tablette */
    .hero-inner, .about-inner, .timeline,
    .skills-grid, .projects-grid, .side-grid,
    .certs-grid, .contact-wrap {
        max-width: 100%;
        min-width: 0;
    }
    .tl-card, .project-card, .skill-block,
    .cert-card, .side-card { min-width: 0; word-break: break-word; }
}

@media (max-width: 580px) {
    .section { padding: 70px 5%; }
    .hero { padding: 110px 5% 50px; }
    .side-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 20px; }
    .modal-box { padding: 26px 20px; }
    .modal-actions { flex-direction: column; }

    /* iframe TryHackMe — trop large, on la réduit */
    .thm-container { overflow: hidden; width: 100%; }
    .thm-container iframe {
        width: 100%;
        max-width: 100%;
        transform: scale(.62);
        transform-origin: top left;
        margin-bottom: -88px;
    }

    footer { flex-direction: column; gap: 12px; text-align: center; }
    .score-row { grid-template-columns: 1fr 70px 30px; gap: 6px; }

    /* Sécurité globale : rien ne dépasse */
    img, iframe, video, table { max-width: 100%; }
    .project-card, .skill-block, .cert-card, .side-card,
    .tl-card, .about-card, .contact-form, .modal-box {
        min-width: 0;
        word-break: break-word;
    }
    /* Chips de tags — retour à la ligne autorisé */
    .project-chips, .tl-tags, .modal-chips { flex-wrap: wrap; }
    /* Badges photo — rentrés sur petit écran */
    .photo-badge { display: none; }
    /* Score bar label raccourci */
    .score-row span { font-size: .72rem; }
}
