/* ==========================================================
   PORTFOLIO — Titouan Gueguen
   Feuille de style commune à toutes les pages
   ========================================================== */

/* --- VARIABLES --- */
:root {
    --fond: #0f1117;
    --fond-2: #161a23;
    --carte: #1b202b;
    --bordure: #2a3140;
    --texte: #e6e9ef;
    --texte-doux: #9aa3b2;
    --accent: #6c8cff;
    --accent-2: #38d3c5;
    --degrade: linear-gradient(135deg, var(--accent), var(--accent-2));
    --rayon: 16px;
    --ombre: 0 10px 30px rgba(0, 0, 0, 0.35);
    --largeur: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--texte);
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(108, 140, 255, 0.15), transparent 60%),
        radial-gradient(700px 400px at -10% 30%, rgba(56, 211, 197, 0.08), transparent 60%),
        var(--fond);
    background-attachment: fixed;
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 48px 20px 80px;
}

h1, h2, h3 {
    line-height: 1.25;
    margin: 0 0 12px;
}

p {
    margin: 0 0 14px;
}

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

/* ==========================================================
   EN-TÊTE / NAVIGATION
   ========================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bordure);
}

.nav-contenu {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-weight: 800;
    font-size: 20px;
    color: var(--texte);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo span {
    background: var(--degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--texte-doux);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

nav a:hover {
    color: var(--texte);
    background: rgba(255, 255, 255, 0.06);
}

nav a.actif {
    color: #fff;
    background: rgba(108, 140, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(108, 140, 255, 0.45);
}

/* ==========================================================
   TITRE DE PAGE
   ========================================================== */
.titre-page {
    text-align: center;
    margin-bottom: 48px;
}

.titre-page h1 {
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.titre-page p {
    color: var(--texte-doux);
    max-width: 600px;
    margin: 0 auto;
}

.titre-page::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin: 20px auto 0;
    border-radius: 4px;
    background: var(--degrade);
}

/* ==========================================================
   CARTES (projets, compétences, expériences, diplômes)
   ========================================================== */
.grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.carte {
    position: relative;
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 28px;
    box-shadow: var(--ombre);
    transition: transform 0.25s, border-color 0.25s;
    overflow: hidden;
}

.carte::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--degrade);
    opacity: 0;
    transition: opacity 0.25s;
}

.carte:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 140, 255, 0.5);
}

.carte:hover::before {
    opacity: 1;
}

.carte h2 {
    font-size: 21px;
    font-weight: 700;
}

.carte h3 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texte-doux);
    margin-top: 20px;
}

.carte p {
    color: #c7cdd8;
}

.carte ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.carte li {
    position: relative;
    padding-left: 22px;
    margin: 6px 0;
    color: #c7cdd8;
}

.carte li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.65em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-2);
}

/* Petites étiquettes (année, lieu, technos...) */
.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    display: inline-block;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bordure);
    color: var(--texte-doux);
}

.tag.accent {
    background: rgba(108, 140, 255, 0.14);
    border-color: rgba(108, 140, 255, 0.4);
    color: #b9c7ff;
}

.tag.vert {
    background: rgba(56, 211, 197, 0.12);
    border-color: rgba(56, 211, 197, 0.4);
    color: #9ceee6;
}

/* Numéro des compétences */
.numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 12px;
    font-weight: 800;
    color: #0f1117;
    background: var(--degrade);
}

/* ==========================================================
   FRISE CHRONOLOGIQUE (expériences, diplômes)
   ========================================================== */
.frise {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding-left: 36px;
}

.frise::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--accent), var(--accent-2), transparent);
}

.frise .carte {
    margin-bottom: 24px;
    overflow: visible;
}

.frise .carte::after {
    content: "";
    position: absolute;
    left: -33px;
    top: 32px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fond);
    border: 3px solid var(--accent);
}

.frise .carte::before {
    border-radius: var(--rayon) var(--rayon) 0 0;
}

/* ==========================================================
   BOUTONS
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-principal {
    color: #0f1117;
    background: var(--degrade);
    box-shadow: 0 8px 24px rgba(108, 140, 255, 0.35);
}

.btn-principal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(108, 140, 255, 0.5);
}

.btn-secondaire {
    color: var(--texte);
    border: 1px solid var(--bordure);
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondaire:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* ==========================================================
   PIED DE PAGE
   ========================================================== */
footer {
    border-top: 1px solid var(--bordure);
    background: var(--fond-2);
}

.footer-contenu {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

footer h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

footer p {
    color: var(--texte-doux);
    margin: 0;
}

.contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contacts a {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--bordure);
    color: var(--texte);
    text-decoration: none;
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
    word-break: break-all;
}

.contacts a:hover {
    border-color: var(--accent);
    background: rgba(108, 140, 255, 0.1);
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: var(--texte-doux);
    padding: 0 20px 24px;
}

/* ==========================================================
   PAGE D'ACCUEIL
   ========================================================== */
.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 56px;
    padding-top: 20px;
}

.photo {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 5px;
    background: var(--degrade);
    box-shadow: 0 20px 60px rgba(108, 140, 255, 0.3);
}

.photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 5px solid var(--fond);
}

.surtitre {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.hero h1 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero h1 span {
    background: var(--degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: #c7cdd8;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

/* Raccourcis vers les rubriques */
.raccourcis {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.raccourci {
    display: block;
    padding: 22px;
    border-radius: var(--rayon);
    border: 1px solid var(--bordure);
    background: var(--carte);
    color: var(--texte);
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.raccourci:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.raccourci strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.raccourci span {
    font-size: 14px;
    color: var(--texte-doux);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 860px) {
    .nav-contenu {
        flex-direction: column;
        gap: 10px;
    }

    nav {
        width: 100%;
        overflow-x: auto;
    }

    nav ul {
        justify-content: center;
        width: max-content;
        margin: 0 auto;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .photo {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    .actions {
        justify-content: center;
    }

    .footer-contenu {
        flex-direction: column;
        text-align: center;
    }

    .contacts {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    main {
        padding: 32px 16px 60px;
    }

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

    .carte {
        padding: 22px;
    }

    .frise {
        padding-left: 28px;
    }

    .frise .carte::after {
        left: -25px;
    }
}
