:root {
    --black: #0A0A0A;
    --dark: #111111;
    --card: #161616;
    --border: #2A2A2A;

    --text: #F5F5F5;
    --muted: #A3A3A3;
    --muted-dark: #6B6B6B;
    --white: #FFFFFF;

    --accent: #22C55E;
    --accent-dark: #16A34A;
    --accent-soft: rgba(34, 197, 94, 0.12);
    --accent-border: rgba(34, 197, 94, 0.35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--black);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

img,
svg,
video {
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

/* Liens */
a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

#accueil,
#profil {
    scroll-margin-top: 70px;
}
#portfolio {
    scroll-margin-top: 70px;

}
#formation {
    scroll-margin-top: 190px;
}

#contact {
    scroll-margin-top: 90px;
}

/* Header */
header {
    min-height: 72px;
    padding: 0 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

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

nav {
    display: flex;
    gap: 28px;
}

nav a {
    font-size: 14px;
    color: var(--muted);
}

/* Layout principal */
main {
    flex: 1;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
}

/* Hero */
.hero {
    width: 100%;
    min-height: min(900px, calc(100svh - 72px));
    padding: clamp(80px, 12vw, 150px) clamp(20px, 6vw, 80px);
    display: flex;
    flex-direction: column;
    background-color: #222;
    position: relative;
    overflow: hidden;
    justify-content: center;  /* centre horizontalement */
    align-items: center;      /* centre verticalement */
    text-align: center;
}

.hero::before,
.hero::after,
.CV::before,
.CV::after,
.footer::before,
.footer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.hero::before,
.CV::before,
.footer::before {
    background-image:
        radial-gradient(1px 1px at 12px 48px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 116px 610px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 180px 90px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 290px 690px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 340px 220px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 410px 32px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 510px 130px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 575px 370px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 690px 310px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 755px 510px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 860px 70px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 930px 450px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 1040px 260px, white 70%, transparent 100%),
        radial-gradient(1px 1px at 1115px 40px, white 70%, transparent 100%);
    background-size: 1900px 760px;
    animation: animStarBig 90s linear infinite;
    opacity: 1;
}

.hero::after,
.CV::after,
.footer::after {
    background-image:
        radial-gradient(2px 2px at 90px 170px, white 75%, transparent 100%),
        radial-gradient(2px 2px at 280px 60px, white 75%, transparent 100%),
        radial-gradient(3px 3px at 480px 340px, white 75%, transparent 100%),
        radial-gradient(2px 2px at 730px 120px, white 75%, transparent 100%),
        radial-gradient(3px 3px at 850px 650px, white 75%, transparent 100%),
        radial-gradient(3px 3px at 980px 410px, white 75%, transparent 100%),
        radial-gradient(2px 2px at 1180px 240px, white 75%, transparent 100%),
        radial-gradient(3px 3px at 1380px 560px, white 75%, transparent 100%),
        radial-gradient(2px 2px at 1495px 315px, white 75%, transparent 100%);
    background-size: 2100px 900px;
    animation: animStarBig 90s linear infinite;
    opacity: 0.95;
}

.hero > *,
.CV > *,
.footer > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 18px;
    font-family: monospace;
}

.hero h1 {
    font-size: clamp(42px, 8vw, 92px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    color: var(--white);
    margin-bottom: 28px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 650px;
    color: var(--muted);
    font-size: 19px;
    margin-bottom: 34px;
}

/* Banner */

.banner {
    width: 100%;
    min-height: 620px;
    padding: 80px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #07120b;
    background: var(--accent);
}

.banner-content {
    width: min(760px, 100%);
    text-align: center;
}

.banner-eyebrow {
    margin-bottom: 16px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.banner h2 {
    margin-bottom: 28px;
    font-size: clamp(38px, 7vw, 62px);
    line-height: 1.05;
    letter-spacing: -.04em;
    color: #07120b;
}

.banner-text {
    margin: 0 auto 34px;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.75;
}

.banner-button {
    padding: 13px 23px;
    color: #fff;
    background: #07120b;
    border: 1px solid #07120b;
}

.banner-button:hover {
    color: #07120b;
    background: transparent;
}

@media (max-width: 700px) {
    .banner { min-height: 520px; padding: 65px 22px; }
}

/* Boutons */
.actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--black);
    border: 1px solid var(--accent);
}

.btn-hero:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Titres de sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 100px;
    margin-top: 100px;
    gap: 20px;
}

.section-header h2 {
    font-size: 28px;
    letter-spacing: -0.04em;
    color: var(--white);
}

.section-header p {
    color: var(--muted-dark);
    font-size: 14px;
}

/* Section portfolio en carré */
#portfolio {
    width: min(1200px, 100%);
    height: auto;
    margin: 18px auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* Titre */
.section-header {
    text-align: center;
}

.section-header h2 {
    color: var(--white);
    font-size: 36px;
    margin: 0;
}

/* Grille des projets */
.projects {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* Cartes */
.card {
    background: #111;
    border: 1px solid var(--border);
    padding: 0px;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: #181818;
}

.card small {
    color: var(--accent);
    font-size: 13px;
    font-family: monospace;
}

.card h3 {
    font-size: 22px;
    color: var(--white);
    margin: 14px 0 10px;
    letter-spacing: -0.03em;
    text-align: center;
}

.card p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
    margin-bottom: 18px;
    text-align: center;
}

.card .tags,
.card-links {
    padding: 0 18px 18px;
}

.card-links {
    display: flex;
    gap: 16px;
}

.card-links a {
    color: var(--accent);
}

.portfolio-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: #1f1f1f;
    color: var(--text);
    font-size: 12px;
    border: 1px solid var(--border);
}

/* Timeline */

.Timeline {
    width: 100%;
    height: auto;
    margin-bottom: 150px;
    margin-top: 150px;
    text-align: center;
}

.Timeline h2 {
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 50px;
    margin-top: 200px;
}

.avatars {
    display: grid;
    gap: 150px;
    position: relative;
}

.avatars {
    display: grid;
    gap: 150px;
    position: relative;
    width: 760px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 250px 190px 250px;
    align-items: center;
    justify-content: center;
}

.timeline-item .avatar,
.timeline-item .timeline-text {
    grid-row: 1;
}

.timeline-item.left .avatar,
.timeline-item.right .avatar {
    grid-column: 2;
}

.timeline-item.left .timeline-text {
    grid-column: 1;
    text-align:right;
    width: 400px;
    transform: translateX(-190px);
}

.timeline-item.right .timeline-text {
    grid-column: 3;
    text-align: left;
    width: 500px;
    transform: translateX(60px);
}

.timeline-text {
    padding: 50px;
    color: var(--text);
}

.timeline-text h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 24px;
}

.timeline-text p {
    color: var(--muted);
}
.avatars::before {
    content: "";
    position: absolute;
    top: 95px;
    bottom: 95px;
    left: 50%;
    width: 4px;
    background: #2ecc71;
    transform: translateX(-50%);
    z-index: 0;
}

.avatar {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #2ecc71;
    position: relative;
    z-index: 1;
    background: #111;
}

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

/* CV */
.CV {
    width: 100%;              /* prend tout l'horizontal */
    height: 300px;            /* tu choisis la taille verticale */
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* centre horizontalement */
    align-items: center;      /* centre verticalement */
    margin-top: 50px;     /* espace au-dessus */
    margin-bottom: 50px;  /* espace en dessous */
    position: relative;
    overflow: hidden;
}

@keyframes animStarSmall {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -300px -1200px;
    }
}

@keyframes animStarBig {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 250px -1400px;
    }
}

.CV h2 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;  /* espace en dessous */
    padding: 0 20px;
    text-align: center;
}

.CV button {
  padding: 14px 30px;
  background: #2ecc71;
  color: #111;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  align-self: center;
}

/*contact */
.contact {
  width: 100%;
  padding: 80px 20px;
  background: var(--black);
  color: var(--text);

  display: flex;
  justify-content: center;
}

.contact-container {
  width: 100%;
  max-width: 700px;
}

.contact h2 {
  font-size: 40px;
  margin-bottom: 10px;
  text-align: center;
}

.contact-text {
  text-align: center;
  color: #aaa;
  margin-bottom: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 16px;
  font-weight: bold;
}

.form-group span {
  color: #2ecc71;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;

  background: #1c1c1c;
  color: white;

  border: 1px solid #333;
  border-radius: 10px;

  font-size: 16px;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2ecc71;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.contact button {
  padding: 14px 30px;

  background: #2ecc71;
  color: #111;

  border: none;
  border-radius: 999px;

  font-size: 16px;
  font-weight: bold;
  cursor: pointer;

  align-self: center;
}

.contact button:hover {
  background: #27ae60;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    background: var(--dark);
    padding: 28px 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted-dark);
    font-size: 14px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

footer nav {
    display: flex;
    gap: 18px;
}

footer a {
    color: var(--muted);
}

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

/* Mentions legales */
.legal-page {
    width: 100%;
    padding: 80px 20px;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    color: var(--white);
    font-size: 42px;
    margin-bottom: 40px;
}

.legal-content article {
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.legal-content h2 {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 12px;
}

.legal-content p {
    color: var(--muted);
    margin-bottom: 10px;
}

/* Erreur 404 */
.error-page {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.error-content {
    width: min(620px, 100%);
}

.error-code {
    color: var(--accent);
    font-size: clamp(70px, 22vw, 170px);
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.08em;
}

.error-content h1 {
    margin: 24px 0 10px;
    color: var(--white);
    font-size: clamp(28px, 7vw, 48px);
}

.error-content > p:not(.error-code) {
    margin-bottom: 28px;
    color: var(--muted);
}

/* Formulaires */
input,
textarea {
    width: 100%;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

label {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 14px;
}



/* LOGIN PAGE */

.login-page {
    min-height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.login {
    width: min(420px, 100%);
    background: #111;
    border: 1px solid var(--border);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login h1 {
    text-align: center;
    color: var(--white);
    font-size: 34px;
    margin-bottom: 8px;
}

.login div {
    width: 100%;
}

.login section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.login button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: var(--black);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* Dashboard administrateur */
.admin-page { background: #090909; }

.admin-header {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 5vw, 70px);
    border-bottom: 1px solid var(--border);
    background: #0d0d0d;
}

.admin-header nav { display: flex; gap: 24px; }
.admin-header a { color: var(--text); }
.admin-header a:hover { color: var(--accent); }

.admin-dashboard {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 55px 0 80px;
}

.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 28px;
}

.admin-title h1 { color: var(--white); font-size: clamp(32px, 5vw, 52px); }
.admin-title > span, .admin-eyebrow { color: var(--accent); }
.admin-eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 12px; }

.admin-panel {
    background: #111;
    border: 1px solid var(--border);
    padding: clamp(20px, 4vw, 34px);
    margin-bottom: 28px;
}

.admin-panel h2 { color: var(--white); margin-bottom: 24px; }

.card-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-wide { grid-column: 1 / -1; }
.form-field label { margin-bottom: 8px; }
.form-field textarea { resize: vertical; }

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.checkbox-field input { width: auto; accent-color: var(--accent); }
.form-actions { display: flex; gap: 12px; }
.form-actions .btn { border: 1px solid var(--border); cursor: pointer; }

.admin-message { padding: 13px 16px; margin-bottom: 18px; border: 1px solid; }
.admin-message.success { color: #83e6a7; border-color: #245f39; background: #102519; }
.admin-message.error { color: #ff9999; border-color: #6a2929; background: #291111; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; color: var(--text); }
.admin-table th, .admin-table td { padding: 15px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td small { color: var(--muted); margin-top: 5px; }

.status { display: inline-block; padding: 5px 9px; font-size: 12px; border-radius: 999px; }
.status.visible { color: #83e6a7; background: #153c23; }
.status.hidden { color: #aaa; background: #292929; }

.table-actions { display: flex; align-items: center; gap: 14px; }
.table-actions a { color: var(--accent); }
.table-actions button { color: #ff8585; background: none; border: 0; cursor: pointer; padding: 0; }

.analytics-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.analytics-clear {
    border: 1px solid #6a2929;
    background: #291111;
    color: #ff9999;
    padding: 10px 14px;
    cursor: pointer;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.analytics-stats article {
    padding: 22px;
    border: 1px solid var(--border);
    background: #0c0c0c;
}

.analytics-stats strong { display: block; color: var(--accent); font-size: 32px; }
.analytics-stats span { color: var(--muted); font-size: 13px; }

.popular-pages { margin-bottom: 32px; }
.popular-pages h3, .analytics-log-title { color: var(--white); margin-bottom: 14px; }
.popular-pages > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.popular-pages code { color: var(--muted); overflow-wrap: anywhere; }
.popular-pages strong { color: var(--text); white-space: nowrap; }
.analytics-table { min-width: 1000px; }
.analytics-referer { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.analytics-graphs { margin-bottom: 42px; }
.graph-period { color: var(--muted); font-size: 13px; }

.graph-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 22px;
}

.graph-card {
    min-width: 0;
    padding: 22px;
    background: #0c0c0c;
    border: 1px solid var(--border);
}

.graph-card h3 { color: var(--white); margin-bottom: 24px; }

.bar-chart {
    height: 260px;
    display: grid;
    grid-template-columns: repeat(14, minmax(22px, 1fr));
    align-items: end;
    gap: 8px;
    padding-top: 25px;
    border-bottom: 1px solid var(--border);
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 64px, rgba(255,255,255,.06) 65px);
}

.bar-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.bar-value { color: var(--text); font-size: 11px; }
.bar { width: min(28px, 85%); min-height: 0; background: linear-gradient(180deg, var(--accent), #18783b); transition: opacity .2s; }
.bar-column:hover .bar { opacity: .7; }
.bar-column small { color: var(--muted); font-size: 10px; white-space: nowrap; transform: translateY(24px) rotate(-45deg); }

.browser-chart { display: flex; flex-direction: column; gap: 20px; }
.browser-row > div { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--text); font-size: 13px; }
.browser-row strong { color: var(--muted); font-size: 12px; white-space: nowrap; }
.browser-track { display: block; height: 8px; background: #252525; overflow: hidden; }
.browser-track > span { display: block; height: 100%; background: var(--accent); }
.graph-empty { color: var(--muted); }

@media (max-width: 700px) {
    .admin-header, .admin-title { align-items: flex-start; gap: 18px; flex-direction: column; }
    .admin-header nav { flex-wrap: wrap; }
    .card-form { grid-template-columns: 1fr; }
    .form-wide { grid-column: auto; }
    .analytics-heading { flex-direction: column; }
    .analytics-stats { grid-template-columns: 1fr; }
    .graph-grid { grid-template-columns: 1fr; }
    .bar-chart { gap: 4px; overflow-x: auto; }
}

/* CV en ligne */
.cv-page {
    min-height: 100vh;
    padding: 34px 20px 70px;
    background: #090909;
}

.cv-toolbar {
    width: min(1050px, 100%);
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-toolbar > a { color: var(--muted); }
.cv-toolbar > a:hover { color: var(--accent); }
.cv-toolbar button { border: 0; cursor: pointer; }

.cv-document {
    width: min(1050px, 100%);
    margin: 0 auto;
    color: #242424;
    background: #f5f2eb;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .45);
}

.cv-header {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 58px 64px 46px;
    color: #fff;
    background: #10291d;
}

.cv-kicker { margin-bottom: 12px; color: #68dc91; text-transform: uppercase; letter-spacing: .22em; font-size: 12px; }
.cv-header h1 { font-size: clamp(48px, 8vw, 78px); line-height: .88; letter-spacing: -.06em; text-transform: uppercase; }
.cv-header h2 { margin-top: 22px; color: #c4d5ca; font-size: 17px; font-weight: 400; }

.cv-contact {
    min-width: 260px;
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.cv-contact a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cv-contact span { color: #a9baaf; }

.cv-layout { display: grid; grid-template-columns: 31% 69%; }
.cv-sidebar { padding: 44px 34px 55px; color: #e6eee9; background: #193a2a; }
.cv-sidebar section + section { margin-top: 34px; }
.cv-sidebar h2, .cv-section > h2 { margin-bottom: 16px; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
.cv-sidebar h2 { color: #68dc91; }
.cv-sidebar ul { padding-left: 18px; }
.cv-sidebar li, .cv-sidebar p { margin-bottom: 8px; color: #d0ddd5; font-size: 13px; line-height: 1.55; }
.cv-skills { list-style: none; padding-left: 0 !important; }
.cv-skills li { padding: 8px 10px; border: 1px solid rgba(255,255,255,.14); }

.cv-main-content { padding: 44px 54px 55px; }
.cv-section + .cv-section { margin-top: 38px; }
.cv-section > h2 { padding-bottom: 10px; color: #1b6c3b; border-bottom: 2px solid #1b6c3b; }
.cv-profile p, .cv-entry p, .cv-project p { font-size: 14px; line-height: 1.65; }

.cv-entry { display: grid; grid-template-columns: 105px 1fr; gap: 20px; padding: 16px 0; }
.cv-entry + .cv-entry { border-top: 1px solid #d4d0c7; }
.cv-entry-date { color: #1b6c3b; font-size: 13px; font-weight: 700; }
.cv-entry h3, .cv-project h3 { color: #17251c; font-size: 18px; }
.cv-entry h4 { margin: 4px 0 8px; color: #59625c; font-size: 13px; }

.cv-project { padding: 14px 0; }
.cv-project + .cv-project { border-top: 1px solid #d4d0c7; }
.cv-technologies { margin: 4px 0 7px; color: #1b6c3b; font-size: 12px !important; font-weight: 700; }
.cv-project-links { display: flex; gap: 16px; margin-top: 7px; }
.cv-project-links a { color: #1b6c3b; font-size: 12px; font-weight: 700; text-decoration: underline; }

@media (max-width: 760px) {
    .cv-page { padding: 0 0 40px; }
    .cv-toolbar { padding: 14px; margin: 0; background: #090909; }
    .cv-header { flex-direction: column; padding: 40px 28px; }
    .cv-contact { min-width: 0; align-self: auto; }
    .cv-layout { grid-template-columns: 1fr; }
    .cv-sidebar, .cv-main-content { padding: 36px 28px; }
    .cv-entry { grid-template-columns: 1fr; gap: 5px; }
}

/* Responsive global */
@media (max-width: 1280px) {
    .Timeline {
        padding-inline: clamp(20px, 5vw, 60px);
    }

    .Timeline h2 {
        margin-top: 80px;
    }

    .avatars {
        width: min(760px, 100%);
        gap: 64px;
    }

    .avatars::before {
        top: 45px;
        bottom: 45px;
        left: 45px;
    }

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        gap: clamp(20px, 4vw, 42px);
        justify-content: stretch;
        align-items: center;
    }

    .timeline-item .avatar,
    .timeline-item.left .avatar,
    .timeline-item.right .avatar {
        width: 90px;
        height: 90px;
        grid-column: 1;
        grid-row: 1;
    }

    .timeline-item .timeline-text,
    .timeline-item.left .timeline-text,
    .timeline-item.right .timeline-text {
        width: auto;
        min-width: 0;
        grid-column: 2;
        grid-row: 1;
        padding: 24px 0;
        text-align: left;
        transform: none;
    }
}

@media (max-width: 1024px) {
    header {
        padding-inline: 32px;
    }

    .projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .admin-header {
        align-items: flex-start;
        gap: 18px;
        flex-direction: column;
    }

    .admin-header nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    #accueil,
    #profil,
    #portfolio,
    #formation,
    #contact {
        scroll-margin-top: 118px;
    }

    header {
        min-height: auto;
        padding: 14px 18px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }

    header > a:first-child {
        align-self: center;
    }

    header nav {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        gap: 18px;
        padding: 2px 0 4px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    header nav a {
        flex: 0 0 auto;
    }

    .hero {
        min-height: calc(100svh - 112px);
        padding: 70px 20px;
    }

    .hero h1 {
        font-size: clamp(34px, 12vw, 62px);
        line-height: 1;
        letter-spacing: -.055em;
    }

    .hero p {
        max-width: 38rem;
        font-size: 16px;
    }

    .banner {
        min-height: auto;
        padding: 70px 22px;
    }

    .banner h2 {
        font-size: clamp(34px, 10vw, 52px);
    }

    #portfolio {
        margin-block: 0;
        padding: 24px 18px 70px;
    }

    .section-header {
        margin: 64px 0 48px;
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .card {
        width: 100%;
        min-width: 0;
    }

    .card img {
        height: clamp(220px, 68vw, 360px);
    }

    .card-links {
        flex-wrap: wrap;
    }

    .Timeline {
        margin: 20px 0 90px;
        padding-inline: 18px;
    }

    .Timeline h2 {
        margin: 50px 0 46px;
        font-size: 34px;
    }

    .avatars {
        gap: 42px;
    }

    .avatars::before {
        left: 35px;
    }

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 18px;
    }

    .timeline-item .avatar,
    .timeline-item.left .avatar,
    .timeline-item.right .avatar {
        width: 70px;
        height: 70px;
        border-width: 3px;
    }

    .timeline-item .timeline-text,
    .timeline-item.left .timeline-text,
    .timeline-item.right .timeline-text {
        padding: 10px 0;
    }

    .timeline-text h3 {
        font-size: 19px;
        overflow-wrap: anywhere;
    }

    .timeline-text p {
        font-size: 14px;
    }

    .CV {
        height: auto;
        min-height: 280px;
        margin-block: 30px;
        padding: 55px 18px;
    }

    .CV h2 {
        font-size: clamp(25px, 8vw, 32px);
        line-height: 1.2;
    }

    .contact {
        padding: 65px 18px;
    }

    .contact h2 {
        font-size: 34px;
    }

    footer {
        padding: 30px 18px;
        text-align: center;
    }

    footer nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .legal-page {
        padding: 50px 18px;
    }

    .legal-content {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .legal-content h1 {
        font-size: clamp(32px, 10vw, 42px);
        line-height: 1.12;
        margin-bottom: 30px;
    }

    .legal-content article {
        padding-block: 22px;
    }

    .login-page {
        min-height: calc(100svh - 112px);
        padding: 36px 16px;
    }

    .login {
        padding: 26px 20px;
    }

    .login h1 {
        font-size: 29px;
    }

    .admin-header {
        align-items: center;
        padding: 16px 18px;
    }

    .admin-header nav {
        flex-wrap: nowrap;
    }

    .admin-dashboard {
        width: calc(100% - 24px);
        padding: 32px 0 60px;
    }

    .admin-panel {
        min-width: 0;
        padding: 18px;
    }

    .admin-panel h2 {
        font-size: 22px;
    }

    .admin-title h1 {
        font-size: 32px;
        line-height: 1.12;
    }

    .form-actions,
    .table-actions {
        flex-wrap: wrap;
    }

    .admin-table-wrap {
        width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table:not(.analytics-table) {
        min-width: 680px;
    }

    .popular-pages > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .graph-card {
        padding: 18px;
        overflow-x: auto;
    }

    .bar-chart {
        width: 520px;
        min-width: 520px;
        overflow: visible;
    }

    .cv-document {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    header {
        padding-inline: 14px;
    }

    .logo {
        font-size: 16px;
    }

    header nav {
        gap: 15px;
    }

    header nav a {
        font-size: 13px;
    }

    .hero {
        padding-inline: 16px;
    }

    .hero h1 {
        font-size: clamp(31px, 11.5vw, 46px);
    }

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 14px;
    }

    .timeline-item .avatar,
    .timeline-item.left .avatar,
    .timeline-item.right .avatar {
        width: 56px;
        height: 56px;
    }

    .avatars::before {
        left: 28px;
    }

    .login {
        padding-inline: 16px;
    }

    .analytics-stats article {
        padding: 18px;
    }

    .cv-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
}

@media print {
    @page { size: A4; margin: 0; }

    .cv-page { padding: 0; background: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cv-toolbar { display: none; }
    .cv-document { width: 210mm; min-height: 297mm; margin: 0; box-shadow: none; }
    .cv-header { padding: 12mm 14mm 10mm; }
    .cv-header h1 { font-size: 48px; }
    .cv-header h2 { margin-top: 12px; }
    .cv-layout { grid-template-columns: 31% 69%; }
    .cv-sidebar { padding: 9mm 7mm; }
    .cv-sidebar section + section { margin-top: 20px; }
    .cv-main-content { padding: 9mm 10mm; }
    .cv-section + .cv-section { margin-top: 22px; }
    .cv-entry, .cv-project { break-inside: avoid; padding: 9px 0; }
    .cv-profile p, .cv-entry p, .cv-project p { font-size: 11px; line-height: 1.45; }
    .cv-sidebar li, .cv-sidebar p { font-size: 10px; line-height: 1.35; }
    .cv-project-links { display: none; }
}
