:root {
    --blue: #1d4ed8;
    --blue-mid: #2563eb;
    --blue-light: #dbeafe;
    --blue-xlight: #eff6ff;
    --text: #0f172a;
    --muted: #475569;
    --soft: #94a3b8;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --green: #059669;
    --green-light: #d1fae5;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

/* ── HEADER ── */
header { background: var(--blue); }
nav {
    max-width: 980px;
    margin: auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-name { color: white; font-weight: 700; font-size: 1rem; text-decoration: none; }
.nav-links { display: flex; gap: 4px; }
nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background 0.15s;
}
nav a:hover { background: rgba(255,255,255,0.14); color: white; }

/* ── HERO ACCUEIL ── */
.hero {
    background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
    color: white;
    padding: 56px 24px 48px;
}
.hero-inner {
    max-width: 980px;
    margin: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 36px;
    align-items: center;
}
.hero-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}
.hero h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.hero-role { font-size: 1rem; opacity: 0.78; margin-bottom: 16px; }
.hero-desc { font-size: 0.9rem; opacity: 0.82; max-width: 520px; margin-bottom: 18px; line-height: 1.6; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.hero-tag {
    background: rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.9);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}
.hero-links { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-hero {
    display: inline-block;
    background: white;
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 7px;
    text-decoration: none;
}
.btn-hero-outline {
    display: inline-block;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 7px;
    text-decoration: none;
}

/* ── CONTAINER ── */
.container { max-width: 980px; margin: 40px auto; padding: 0 24px; }

/* ── SECTION LABEL ── */
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--soft);
    margin-bottom: 14px;
}

/* ── INTRO CARD ── */
.intro-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 26px;
    margin-bottom: 28px;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.7;
}
.intro-card strong { color: var(--text); }

/* ── GRID SAÉ ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 16px; }
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--blue-mid); box-shadow: 0 4px 16px rgba(37,99,235,0.09); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.card-num {
    font-size: 0.7rem; font-weight: 700; color: var(--blue-mid);
    background: var(--blue-xlight); padding: 2px 9px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.card-comp {
    font-size: 0.7rem; font-weight: 600; color: var(--purple);
    background: var(--purple-light); padding: 2px 9px; border-radius: 4px;
}
.card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.card p { font-size: 0.84rem; color: var(--muted); flex: 1; line-height: 1.55; }
.card-ac { font-size: 0.76rem; color: var(--soft); font-style: italic; }
.card-link {
    font-size: 0.83rem; color: var(--blue-mid); font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.card-link:hover { text-decoration: underline; }
.arrow { transition: transform 0.15s; display: inline-block; }
.card:hover .arrow { transform: translateX(3px); }

/* ── PAGE BANNER ── */
.page-banner {
    background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 100%);
    color: white;
    padding: 48px 24px 40px;
}
.page-banner-inner { max-width: 980px; margin: auto; }
.page-banner .num {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 12px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 14px;
}
.page-banner h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-banner .tagline { font-size: 0.95rem; opacity: 0.8; }

/* ── DETAIL LAYOUT ── */
.detail-grid { display: grid; grid-template-columns: 1fr 270px; gap: 20px; margin-top: 28px; }

.content-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 30px;
    margin-bottom: 16px;
}
.content-block h2 {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--soft);
    margin-bottom: 10px; margin-top: 24px;
}
.content-block h2:first-child { margin-top: 0; }
.content-block p { font-size: 0.92rem; color: var(--muted); margin-bottom: 10px; line-height: 1.65; }
.content-block ul { padding-left: 18px; margin-bottom: 12px; }
.content-block ul li { font-size: 0.92rem; color: var(--muted); margin-bottom: 7px; line-height: 1.55; }
.content-block ul li::marker { color: var(--blue-mid); }

/* ── AC BLOCK ── */
.ac-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ac-item {
    background: var(--blue-xlight);
    border: 1px solid var(--blue-light);
    border-radius: 7px;
    padding: 10px 14px;
}
.ac-code { font-size: 0.72rem; font-weight: 700; color: var(--blue-mid); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.ac-label { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ac-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ── TRACE BLOCK ── */
.trace-block {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 7px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.trace-label { font-size: 0.7rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.trace-block p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0; }

/* ── NOTE PERSO ── */
.note-perso {
    background: var(--amber-light);
    border: 1px solid #fcd34d;
    border-radius: 7px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: #78350f;
    margin-top: 4px;
    line-height: 1.6;
}

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.sidebar-card h3 {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--soft); margin-bottom: 12px;
}
.info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--soft); }
.info-row span:last-child { color: var(--text); font-weight: 600; }
.badge-ok { background: var(--green-light); color: var(--green); font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 4px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag { font-size: 0.74rem; font-weight: 600; background: var(--blue-xlight); color: var(--blue); padding: 3px 10px; border-radius: 5px; }

/* ── AUTOEVAL ── */
.autoeval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.autoeval-item { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 12px 14px; }
.autoeval-title { font-size: 0.72rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
.autoeval-item p { font-size: 0.83rem; color: var(--muted); margin-bottom: 0; }
.niveau-bar { margin-top: 14px; }
.niveau-label { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.niveau-track { height: 6px; background: var(--border); border-radius: 3px; }
.niveau-fill { height: 100%; background: var(--blue-mid); border-radius: 3px; }
.niveau-ticks { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--soft); margin-top: 4px; }

/* ── BILAN PAR COMPÉTENCE ── */
.competence-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 26px;
    margin-bottom: 16px;
}
.competence-card .comp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.comp-badge {
    display: inline-block;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 12px; border-radius: 5px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.comp-rt1 { background: var(--blue-xlight); color: var(--blue); }
.comp-rt2 { background: #ecfdf5; color: var(--green); }
.comp-rt3 { background: var(--purple-light); color: var(--purple); }
.competence-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.competence-card .niveau-info { font-size: 0.82rem; color: var(--muted); }
.ac-check-list { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.ac-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.85rem; color: var(--muted);
}
.ac-check-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; flex-shrink: 0; margin-top: 1px; }
.ac-ok { background: var(--green-light); color: var(--green); }
.ac-partial { background: var(--amber-light); color: var(--amber); }

/* ── PRÉSENTATION PAGE ── */
.profile-header {
    background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 100%);
    color: white;
    padding: 48px 24px 40px;
}
.profile-header-inner {
    max-width: 980px;
    margin: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
}
.profile-photo {
    width: 90px; height: 90px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.profile-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.profile-header .role { opacity: 0.8; font-size: 0.95rem; margin-bottom: 12px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tag {
    background: rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.88);
    font-size: 0.75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ── BACK ── */
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 0.84rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--blue-mid); }

/* ── FOOTER ── */
footer { text-align: center; padding: 24px 20px; background: #0f172a; color: rgba(255,255,255,0.4); font-size: 0.82rem; margin-top: 48px; }
footer a { color: #93c5fd; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .detail-grid, .hero-inner, .profile-header-inner, .autoeval-grid { grid-template-columns: 1fr; }
}
