/* =========================================================
   MrFoxit — carte de visite
   Thème : glassmorphism clair aux couleurs de Foxit
   ========================================================= */

/* ---------- Polices (auto-hébergées) ---------- */
@font-face {
    font-family: "Comfortaa";
    src: url("../fonts/Comfortaa-Bold.woff") format("woff");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Regular.woff") format("woff");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-SemiBold.woff") format("woff");
    font-weight: 600;
    font-display: swap;
}

/* ---------- Palette (tirée de la ref sheet) ---------- */
:root {
    --fur:        #C08B57;   /* fourrure */
    --orange:     #C67526;   /* ventre / accent principal */
    --orange-ink: #9A5615;   /* orange foncé lisible pour le texte */
    --gray:       #767877;   /* gris clair */
    --gray-dark:  #4D4D4D;   /* gris foncé */
    --ink:        #2A2A2A;   /* texte */
    --green:      #487734;   /* yeux */
    --yellow:     #FFE600;   /* anneaux */
    --bg:         #FFF6EC;   /* fond crème */

    --glass-bg:     rgba(255, 255, 255, .55);
    --glass-border: rgba(255, 255, 255, .75);
    --glass-shadow: 0 10px 35px rgba(77, 77, 77, .12);
    --radius: 24px;

    --font-title: "Comfortaa", "Trebuchet MS", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: linear-gradient(160deg, #FFF9F2 0%, var(--bg) 45%, #FCE9D6 100%) fixed;
    overflow-x: hidden;
}

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

a { color: var(--orange-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green); }

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
    border-radius: 8px;
}

h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0; }

/* ---------- Taches floues du fond ---------- */
.blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    animation: float 22s ease-in-out infinite alternate;
}
.blob--tan    { width: 46vmax; height: 46vmax; background: var(--fur);    top: -14vmax; left: -12vmax; }
.blob--orange { width: 38vmax; height: 38vmax; background: var(--orange); bottom: -14vmax; right: -10vmax; animation-delay: -6s; opacity: .45; }
.blob--gray   { width: 30vmax; height: 30vmax; background: var(--gray);   top: 35%; right: 18%; opacity: .22; animation-delay: -12s; }
.blob--green  { width: 14vmax; height: 14vmax; background: var(--green);  top: 62%; left: 8%; opacity: .18; animation-delay: -3s; }

@keyframes float {
    to { transform: translate(4vmax, 3vmax) scale(1.08); }
}

/* ---------- Effet verre ---------- */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
}
/* Secours pour les navigateurs sans backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background: rgba(255, 255, 255, .9); }
}

.card {
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
}

/* ---------- Barre de navigation ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: .9rem 1rem 0;
}
.nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .4rem .5rem;
    border-radius: 999px;
}
.nav__logo img { width: 32px; height: 32px; border-radius: 50%; }
.nav__logo { margin-right: .25rem; }
.nav__link {
    padding: .45rem .9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--gray-dark);
    text-decoration: none;
    transition: background .2s, color .2s;
}
.nav__link:hover { background: rgba(198, 117, 38, .12); color: var(--orange-ink); }
.nav__link.is-active { background: var(--orange); color: #fff; }

/* ---------- Mise en page générale ---------- */
main { width: min(1100px, 100% - 2rem); margin-inline: auto; }

.section { padding-block: clamp(3rem, 8vw, 5.5rem) 0; }

.section__title {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}
.section__title::after {
    content: "";
    display: block;
    width: 56px;
    height: 5px;
    margin: .7rem auto 0;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--orange), var(--fur));
}

/* ---------- Accueil ---------- */
.hero {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 2rem;
    padding-block: 2rem;
}
.kicker {
    margin: 0 0 .3rem;
    font-weight: 600;
    color: var(--gray);
    letter-spacing: .05em;
    text-transform: uppercase;
    font-size: .9rem;
}
.hero__title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    color: var(--gray-dark);
    letter-spacing: -.02em;
}
.hero__title span {
    background: linear-gradient(120deg, var(--orange) 10%, var(--fur) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__tagline {
    max-width: 32rem;
    font-size: 1.15rem;
    margin: 1rem 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__visual { position: relative; justify-self: center; }
.hero__halo {
    width: min(380px, 75vw);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 1.2rem;
    display: grid;
    place-items: center;
}
.hero__halo img { animation: bob 6s ease-in-out infinite; }
.hero__sticker {
    position: absolute;
    width: 38%;
    right: -8%;
    bottom: -6%;
    transform: rotate(8deg);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .15));
    transition: transform .3s;
}
.hero__sticker:hover { transform: rotate(-4deg) scale(1.08); }

@keyframes bob {
    50% { transform: translateY(-10px) rotate(-1.5deg); }
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-block;
    padding: .85rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 8px 20px rgba(198, 117, 38, .35);
}
.btn--primary:hover { color: #fff; background: #B6681D; }
.btn--glass {
    color: var(--gray-dark);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.btn--glass:hover { color: var(--orange-ink); }

/* ---------- Foxit en bref ---------- */
.profile {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: center;
}
.profile__img { animation: bob 7s ease-in-out infinite; }

.badges {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.badge {
    padding: .35rem .85rem;
    border-radius: 999px;
    background: rgba(198, 117, 38, .12);
    border: 1px solid rgba(198, 117, 38, .25);
    font-size: .95rem;
}
.badge b { color: var(--orange-ink); font-weight: 600; margin-right: .3rem; }

.traits { margin: 0 0 1.25rem; display: grid; gap: .6rem; }
.traits div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; }
.traits dt { font-weight: 600; color: var(--gray-dark); }
.traits dd { margin: 0; }

.palette { display: flex; gap: .5rem; }
.palette span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--c);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    transition: transform .2s;
}
.palette span:hover { transform: scale(1.2); }

.refs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}
.ref {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1rem;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: zoom-in;
    transition: transform .25s, box-shadow .25s;
}
.ref:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(77, 77, 77, .18); }
.ref img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}
.ref__label { font-family: var(--font-title); font-weight: 700; font-size: 1.1rem; }
.ref__label small {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: .85rem;
    color: var(--gray-dark);
}

/* ---------- Évolution ---------- */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.version { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.version img {
    aspect-ratio: 1000 / 824;
    object-fit: contain;
    background: rgba(255, 255, 255, .6);
    border-radius: 16px;
}
.version__year {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    background: var(--gray-dark);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}
.version h3 { font-size: 1.35rem; margin: .5rem 0 .4rem; color: var(--gray-dark); }
.version p { margin: 0; font-size: .97rem; }
.version--now { border-color: rgba(198, 117, 38, .5); }
.version--now .version__year { background: var(--orange); }

/* ---------- Qui est derrière ---------- */
.about {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: center;
}
.about__img { border-radius: 20px; }
.about__body p { margin: 0 0 1rem; }
.about__body p:last-child { margin-bottom: 0; }

.chips {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.chips li {
    padding: .35rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(118, 120, 119, .25);
    font-size: .92rem;
}

/* ---------- Réseaux ---------- */
.socials {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.social {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    color: var(--ink);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.social:hover {
    color: var(--ink);
    transform: translateY(-3px);
    border-color: var(--orange);
    box-shadow: 0 14px 34px rgba(198, 117, 38, .22);
}
.social img { width: 44px; height: 44px; object-fit: contain; }
.social b { display: block; font-weight: 600; }
.social small { color: var(--gray-dark); }

/* ---------- Pied de page ---------- */
.footer {
    text-align: center;
    padding: 4rem 1rem 2rem;
    font-size: .88rem;
    color: var(--gray-dark);
}
.footer p { margin: 0; }

/* ---------- Visionneuse ---------- */
.lightbox {
    max-width: min(1100px, 94vw);
    max-height: 92vh;
    padding: 1rem;
    border: 0;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.lightbox::backdrop {
    background: rgba(42, 42, 42, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.lightbox img { max-height: 78vh; width: auto; margin-inline: auto; border-radius: 14px; }
.lightbox__caption { text-align: center; margin: .6rem 0 0; color: var(--gray-dark); font-size: .9rem; }
.lightbox__close {
    position: absolute;
    top: .6rem;
    right: .6rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- Apparition au scroll ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .timeline { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding-top: 2.5rem;
    }
    .hero__visual { order: -1; }
    .hero__tagline { margin-inline: auto; }
    .hero__actions { justify-content: center; }

    .profile, .about { grid-template-columns: 1fr; text-align: center; }
    .profile__img { width: 200px; margin-inline: auto; }
    .about__img { width: 220px; margin-inline: auto; }
    .badges, .chips, .palette { justify-content: center; }
    .traits div { grid-template-columns: 1fr; gap: 0; }

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

    .nav__link { padding: .4rem .6rem; font-size: .88rem; }

    /* Moins de flou sur mobile = plus fluide */
    .glass {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, .68);
    }
}

@media (max-width: 380px) {
    .nav__logo { display: none; }
}

/* Respecte le réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
}
