/* ==========================================================
   Portfolio testeur logiciel : Aurélien Girodet
   Même identité que le site freelance : Cormorant Garamond
   pour les titres, Montserrat pour le texte.
   ========================================================== */

:root {
    --ink: #1C1C1E;
    --text: #48484A;
    --muted: #6B6B70;
    --bg: #FBFAF8;
    --bg-alt: #F3F1EC;
    --line: #ECEAE5;
    --line-alt: #D9D4CA;
    --gold: #B8A27A;
    --gold-dark: #6B5B3E;
    --gold-light: #CDB98F;
    --dark: #1C1C1E;
    --on-dark: #F5F4F0;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Montserrat", system-ui, sans-serif;
    --max: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--ink);
}

a:hover {
    color: #3A3A3C;
}

a:focus-visible {
    outline: 2px solid var(--gold-dark);
    outline-offset: 3px;
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    background: var(--ink);
    color: var(--on-dark);
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 10;
}

.skip-link:focus {
    top: 16px;
    color: var(--on-dark);
}

/* ---------- En-tête ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    padding-bottom: 24px;
}

.monogram {
    width: 44px;
    height: 44px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.nav-list a {
    display: inline-block;
    padding: 10px 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

/* ---------- Typographie commune ---------- */
.overline {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.overline-light {
    color: var(--gold-light);
}

.section-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.1;
}

.link-underline {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding: 10px 0 4px;
}

.link-gold {
    border-bottom-color: var(--gold);
}

.loading {
    color: var(--muted);
}

/* ---------- Accueil ---------- */
.hero {
    padding-top: 96px;
    padding-bottom: 104px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(52px, 9vw, 88px);
    line-height: 1;
}

.hero-lead {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.45;
    max-width: 640px;
}

.hero-text {
    margin: 0;
    color: var(--text);
    max-width: 620px;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 12px;
}

/* ---------- Projets ---------- */
.projects {
    padding-bottom: 96px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 40px;
    margin-bottom: 56px;
}

.section-count {
    font-size: 13px;
    color: var(--muted);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.project {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

/* Une ligne sur deux : image à droite */
.project:nth-child(even) {
    flex-direction: row-reverse;
}

.project-media,
.project-body {
    flex: 1 1 420px;
    min-width: 0;
}

.project-media {
    border-radius: 16px;
    overflow: hidden;
    background: #EEEBE5;
}

.project-media img {
    width: 100%;
    height: auto;
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.project-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.1;
}

.project-text {
    margin: 0;
    color: var(--text);
}

.project-tags {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.project-link {
    font-size: 14px;
    font-weight: 600;
    align-self: flex-start;
    padding: 8px 0;
}

/* ---------- Compétences ---------- */
.skills {
    background: var(--bg-alt);
    padding: 88px 0 96px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 48px;
    margin: 48px 0;
}

.skill {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--line-alt);
    padding-top: 18px;
}

.skill-number {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gold-dark);
}

.skill-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.skill-text {
    margin: 0;
    color: var(--text);
    font-size: 14px;
}

.tools {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Parcours ---------- */
.about {
    padding-top: 96px;
    padding-bottom: 96px;
    display: flex;
    flex-wrap: wrap;
    gap: 64px;
}

.about-text {
    flex: 2 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-text p {
    margin: 0;
    color: var(--text);
}

.about-text .about-lead {
    font-size: 18px;
    color: var(--ink);
}

.facts {
    flex: 1 1 300px;
    min-width: 0;
    margin: 0;
    align-self: flex-start;
    font-size: 14px;
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.facts div:last-child {
    border-bottom: 1px solid var(--line);
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
}

/* ---------- Contact ---------- */
.contact {
    background: var(--dark);
    color: var(--on-dark);
    padding: 96px 0 40px;
}

.contact a {
    color: var(--on-dark);
}

.contact a:focus-visible {
    outline-color: var(--gold-light);
}

.contact-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: flex-end;
    justify-content: space-between;
}

.contact-main {
    flex: 1 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(36px, 5.5vw, 52px);
    line-height: 1.05;
}

.contact-mail {
    font-size: clamp(17px, 2vw, 20px);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-light);
    align-self: flex-start;
    padding: 8px 0 4px;
    overflow-wrap: anywhere;
}

.contact-links {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 1 300px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.contact-links a {
    display: inline-block;
    padding: 6px 0;
}

.contact-links a.button-light {
    margin-top: 10px;
    text-decoration: none;
    background: var(--on-dark);
    color: var(--ink);
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 600;
}

.legal {
    margin-top: 72px;
    font-size: 12px;
    color: #A1A1A6;
}

.legal p {
    margin: 4px 0;
}

/* ---------- Page 404 ---------- */
.not-found {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

/* ---------- Écrans étroits ---------- */
@media (max-width: 900px) {
    .skill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero {
        padding-top: 64px;
        padding-bottom: 72px;
    }

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

    .project:nth-child(even) {
        flex-direction: row;
    }

    .project-title {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
