/* ============================================
   PORTFOLIO GEII — STYLESHEET
   Aesthetic: Technical / Industrial / Clean
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent: #3b82f6;
    --accent-light: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.08);
    --accent-border: rgba(59, 130, 246, 0.25);

    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.08);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.08);
    --info: #7c3aed;
    --info-bg: rgba(124, 58, 237, 0.08);

    --border: rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.12);

    --font-display: 'Sora', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-display);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    z-index: 1000;
    transition: background 0.3s;
}

#navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    border-bottom-color: var(--border-strong);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    gap: 2px;
}

.logo-bracket {
    color: var(--accent);
}

.logo-text {
    color: var(--text-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.nav-links a.active {
    color: var(--accent-light);
}

/* Burger menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(248, 250, 252, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem 1.5rem 2rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ============================================
   SECTIONS — General
   ============================================ */
.section {
    padding: calc(var(--nav-height) + 3rem) clamp(1.5rem, 6vw, 6rem) 4rem;
}

/* ============================================
   HERO / ACCUEIL
   ============================================ */
.section-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 40%, black, transparent);
}

.hero-content {
    position: relative;
    max-width: 680px;
}

.hero-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 2rem;
    letter-spacing: 0.03em;
    animation: fadeInUp 0.6s ease both;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
    animation: fadeInUp 0.6s ease both;
}

.hero-title .line-1 {
    animation-delay: 0.1s;
    color: var(--text-primary);
}

.hero-title .line-2 {
    animation-delay: 0.2s;
    background: linear-gradient(135deg, var(--accent-light), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-phrase {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 560px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-phrase strong {
    color: var(--text-primary);
}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.detail-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.detail-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    min-width: 110px;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--bg-primary);
    background: var(--accent);
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-cta:hover {
    background: var(--accent-light);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

/* Photo */
.hero-visual {
    position: relative;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.photo-frame {
    width: 280px;
    height: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    position: relative;
}

.photo-frame::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(160deg, var(--accent-border), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.photo-placeholder span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

@media (max-width: 900px) {
    .section-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-phrase {
        max-width: 100%;
    }

    .hero-details {
        align-items: center;
    }

    .detail-item {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .hero-visual {
        order: -1;
    }

    .photo-frame {
        width: 200px;
        height: 240px;
        margin: 0 auto;
    }
}

/* ============================================
   COMPETENCE SECTIONS
   ============================================ */
.section-competence {
    min-height: auto;
    border-top: 1px solid var(--border);
}

.section-competence:nth-child(even) {
    background: var(--bg-secondary);
}

.comp-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.comp-number {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
    opacity: 0.4;
    min-width: 80px;
}

.comp-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.comp-parcours {
    font-family: var(--font-mono);
    font-size: 0.5em;
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 0.15em 0.6em;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.25em;
}

.comp-level {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Body layout */
.comp-body {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.comp-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.comp-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Description */
.comp-description p {
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.apprentissages {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    max-width: 800px;
}

.apprentissages h4 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.apprentissages ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.apprentissages li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.apprentissages li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Preuves */
.preuve-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.3s;
    margin-bottom: 1rem;
}

.preuve-card:hover {
    border-color: var(--accent-border);
}

.preuve-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 1rem;
}

.preuve-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.preuve-context,
.preuve-role,
.preuve-apprentissage {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.preuve-context strong,
.preuve-role strong,
.preuve-apprentissage strong {
    color: var(--text-primary);
    font-weight: 500;
}

.preuve-media {
    margin-top: 1.5rem;
}

.media-content {
    width: 700px;
    height: 450px;
    border-radius: 5px;
}

.media-placeholder {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.media-placeholder span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Auto-évaluation */
.eval-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.eval-card {
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.eval-forces {
    background: var(--success-bg);
    border-color: rgba(34, 197, 94, 0.15);
}

.eval-ameliorer {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.15);
}

.eval-methodes {
    background: var(--info-bg);
    border-color: rgba(139, 92, 246, 0.15);
}

.eval-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.eval-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.eval-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   BILAN
   ============================================ */
.section-bilan {
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.bilan-header {
    text-align: center;
    margin-bottom: 3rem;
}

.bilan-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.bilan-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bilan-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.bilan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
}

.bilan-card:hover {
    border-color: var(--accent-border);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.bilan-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.bilan-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.bilan-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem clamp(1.5rem, 6vw, 6rem);
    text-align: center;
}

.footer-content p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-contact a:hover {
    color: var(--accent-light);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .comp-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .comp-number {
        font-size: 2.5rem;
        min-width: auto;
    }

    .eval-grid {
        grid-template-columns: 1fr;
    }

    .apprentissages {
        padding: 1.25rem 1.5rem;
    }

    .preuve-card {
        padding: 1.5rem;
    }

    .section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
