/* ════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════ */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: var(--white);
    padding: 90px 48px;
    min-height: 700px;
    display: flex;
    align-items: center;
    height: 100vh;
    margin-top: 0;
    padding-top: 165px;
}

.hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    width: 100%;
    display: block;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: clamp(44px, 6vw, 64px);
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

/* Mot surligné : fond bleu incliné de 1,2° (seul le fond tourne, le texte reste droit) */
/* Indicateur de scroll : chevron animé en bas de la hero */
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1.5px solid color-mix(in srgb, var(--surface) 48%, transparent);
    border-radius: 16px;
    color: var(--surface);
    transition: background-color .2s, color .2s, border-color .2s;
}

.hero-scroll svg {
    width: 22px;
    height: 22px;
    animation: hero-scroll-bounce 1.8s ease-in-out infinite;
}

.hero-scroll:hover {
    background: var(--surface);
    border-color: var(--surface);
    color: var(--accent);
}

@keyframes hero-scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll svg {
        animation: none;
    }
}

.hero-title__end {
    display: block;
    margin-top: 0.3em;
}

.hero-highlight {
    position: relative;
    display: inline-block;
    z-index: 0;
    font-weight: 600;
    color: var(--white);
}

.hero-highlight::before {
    content: "";
    position: absolute;
    inset: 0 -0.12em;
    z-index: -1;
    background: var(--btn-metal);
    box-shadow: var(--btn-metal-shadow);
    transform: rotate(-1.2deg);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: color-mix(in srgb, var(--surface) 80%, var(--ink));
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}



/* ════════════════════════════════════════════════
   À PROPOS
════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════
   COMPÉTENCES
════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════
   RÉALISATIONS / PROJETS
════════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.project-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    border-color: var(--border-blue);
    box-shadow: 0 16px 48px color-mix(in srgb, var(--ink) 6%, transparent);
    transform: translateY(-4px);

}

.project-image-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: var(--grey);
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s;
}

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

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 28px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--black);
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.project-tag {
    color: var(--blue);
    background-color: color-mix(in srgb, var(--accent) 12%, transparent);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    display: block;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 6px;
    margin: 0;
}

.project-description {
    font-size: 18px;
    line-height: 1.5;
    color: var(--grey-text);
    margin-bottom: 16px;
    flex-grow: 1;
}


/* ════════════════════════════════════════════════
   CTA SECTION
════════════════════════════════════════════════ */
.cta-section {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: var(--white);
    text-align: center;
    padding: 100px 48px;
}

/* Gradient animé de la section CTA (canvas WebGL), même cadrage que la hero */
.cta-gradient {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    pointer-events: none;
}

.cta-section > .cta-inner {
    position: relative;
    z-index: 1;
}

.cta-inner {
    max-width: 580px;
    margin: 0 auto;
}

.cta-section h2 {
    color: var(--white);
    font-size: var(--fs-title);
    margin-bottom: 18px;
}

.cta-section>.cta-inner>p {
    color: color-mix(in srgb, var(--surface) 80%, var(--ink));
    margin-bottom: 36px;
    font-size: 18px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}



/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 800px) {
    .hero {
        padding: 64px 24px;
    }

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

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

    .cta-section {
        padding: 72px 24px;
    }

    .modal-panel {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px 28px;
        width: 95%;
    }

    .modal-close {
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 500px) {
    .hero-cta {
        flex-direction: column;
    }


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

    .hero {
        margin-top: 0px;
        padding-top: 80px;
    }

}


/* ════════════════════════════════════════════════
   SECTION À PROPOS — reprise du design INSPIRATIONS
   Scopée sous #apropos pour ne pas toucher le reste du site.
════════════════════════════════════════════════ */
#apropos .section__head {
    margin-bottom: 0;
}

#apropos .about__grid {
    display: grid;
    gap: 24px;
}

#apropos .about__statement {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: var(--fs-title);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--ink);
}

#apropos .about__statement em {
    font-style: normal;
    /* Texte bleu avec un reflet qui traverse le mot toutes les 8 secondes */
    color: transparent;
    background-image: linear-gradient(110deg,
        var(--accent) 0%,
        var(--accent) 40%,
        color-mix(in srgb, var(--surface) 70%, var(--accent)) 50%,
        var(--accent) 60%,
        var(--accent) 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    animation: about-sheen 4.3s ease-in-out infinite;
}

@keyframes about-sheen {
    0% {
        background-position: 100% 0;
    }
    12% {
        background-position: 0% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #apropos .about__statement em {
        color: var(--accent);
        background: none;
        animation: none;
    }
}

#apropos .about__text {
    display: grid;
    gap: 24px;
    font-size: 18px;
    line-height: 1.55;
}

#apropos .about__text p {
    margin: 0;
    color: var(--grey-text);
}

#mes-competences .values {
    margin-top: 0;
    padding: 0;
    list-style: none;
}

#mes-competences .values li {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    align-items: baseline;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
}

#mes-competences .values li:first-child {
    padding-top: 0;
}

#mes-competences .values li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

/* Titre de la section Mes compétences */
#mes-competences .competences__title {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: var(--fs-title);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 40px;
}

/* Mot surligné : fond vert citron incliné de -1,2° (le texte reste droit) */
#mes-competences .competences__highlight {
    position: relative;
    display: inline-block;
    z-index: 0;
    font-weight: 500;
}

#mes-competences .competences__highlight::before {
    content: "";
    position: absolute;
    inset: 0 -0.12em;
    z-index: -1;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent-2) 88%, var(--ink)) 0%,
        color-mix(in srgb, var(--accent-2) 96%, var(--surface)) 18%,
        color-mix(in srgb, var(--accent-2) 90%, var(--ink)) 34%,
        color-mix(in srgb, var(--accent-2) 92%, var(--surface)) 50%,
        var(--accent-2) 62%,
        color-mix(in srgb, var(--accent-2) 94%, var(--ink)) 80%,
        color-mix(in srgb, var(--accent-2) 96%, var(--surface)) 94%,
        color-mix(in srgb, var(--accent-2) 88%, var(--ink)) 100%);
    box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--surface) 55%, transparent),
        inset -1px -1px 0 color-mix(in srgb, var(--ink) 35%, transparent),
        0 6px 14px -6px color-mix(in srgb, var(--ink) 35%, transparent);
    transform: rotate(-1.2deg);
}

/* Outils maîtrisés sous les compétences */
#mes-competences .approach-tools {
    grid-column: 1 / -1;
    margin-top: 40px;
}

#mes-competences .approach-tools__title {
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-text);
}

#mes-competences .approach-tools__list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    list-style: none;
}

#mes-competences .approach-tools__list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: transform 0.15s ease-in-out;
}

#mes-competences .approach-tools__list li:hover {
    transform: translateY(-3px);
}

#mes-competences .approach-tools__list img {
    width: auto;
    height: 18px;
    max-width: 24px;
    flex: none;
}

#mes-competences .approach-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Carte qui regroupe le sélecteur et les compétences */
/* Sélecteur UX/UI Design / Product Design */
#mes-competences .approach-switch {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 24px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background-color: var(--surface);
}

#mes-competences .approach-switch__btn {
    min-height: 48px;
    padding: 0 1.4rem;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

#mes-competences .approach-switch__btn:hover {
    background: color-mix(in srgb, var(--ink) 6%, transparent);
}

#mes-competences .approach-switch__btn[aria-pressed="true"] {
    background: var(--btn-dark-metal);
    color: var(--surface);
    box-shadow: var(--btn-dark-shadow);
}

#mes-competences .approach-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: clamp(24px, 4vw, 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
}

#mes-competences .approach-panel[hidden] {
    display: none;
}

#mes-competences .approach-panel {
    transition: opacity .3s ease, transform .3s cubic-bezier(0.22, 1, 0.36, 1);
}

#mes-competences .approach-panel.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

#mes-competences .approach-panel.is-entering {
    opacity: 0;
    transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
    #mes-competences .approach-panel {
        transition: none;
    }
}

@media (min-width: 700px) {
    #mes-competences .approach-panel {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 48px;
    }
}

/* Desktop : titre, texte puis liste empilés, sur toute la largeur du conteneur */
@media (min-width: 960px) {
    #apropos .about__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ════════════════════════════════════════════════
   QUI SUIS-JE — présentation (carte d'introduction)
════════════════════════════════════════════════ */
.about-intro-card {
    display: flex;
    gap: 24px;
    align-items: stretch;
    width: fit-content;
}

.about-portrait {
    width: 250px;
    min-height: 300px;
    align-self: stretch;
    border-radius: 8px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ink) 8%, var(--bg));
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.about-intro-text h2 {
    font-size: var(--fs-title);
    color: var(--black);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.about-intro-text p {
    font-size: 18px;
    line-height: 1.55;
    color: var(--grey-text);
    margin-bottom: 24px;
}

.about-intro-text .btn-contact {
    align-self: flex-start;
    margin-top: 8px;
}

.about-intro-text .btn-primary {
    align-self: flex-start;
}

@media (max-width: 800px) {
    .about-portrait {
        width: 200px;
    }
}

@media (max-width: 500px) {
    .about-intro-card {
        flex-direction: column;
    }

    .about-intro-card .about-portrait {
        width: 100%;
        min-height: 0;
        align-self: auto;
    }
}

/* Grain fin par-dessus le dégradé de la hero (effet métallisé) */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.34;
    mix-blend-mode: overlay;
}

.hero .hero-inner {
    position: relative;
    z-index: 1;
}

.hero .hero-scroll {
    z-index: 1;
}



/* Alternance des fonds de sections (sans séparateurs), sur toute la largeur de l'écran */
#apropos,
#mes-competences,
#about,
#realisations {
    position: relative;
    isolation: isolate;
}

#apropos::before,
#mes-competences::before,
#about::before,
#realisations::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--section-bg);
    z-index: -1;
}

#apropos { --section-bg: var(--surface); }
#mes-competences { --section-bg: var(--bg); }
#about { --section-bg: var(--surface); }
#realisations { --section-bg: color-mix(in srgb, var(--ink) 2%, var(--surface)); }

/* Bouton actif du sélecteur : même balayage de lumière que les boutons métalliques */
#mes-competences .approach-switch__btn[aria-pressed="true"] {
    background-size: 200% 200%;
    background-position: 0% 0%;
    transition: background-position .6s ease-out, background-color .2s, color .2s;
    box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--surface) 35%, transparent),
        inset -1px -1px 0 color-mix(in srgb, var(--surface) 10%, transparent),
        0 6px 16px -6px color-mix(in srgb, var(--ink) 60%, transparent);
}

#mes-competences .approach-switch__btn[aria-pressed="true"]:hover {
    background-position: 100% 100%;
}

@media (prefers-reduced-motion: reduce) {
    #mes-competences .approach-switch__btn[aria-pressed="true"] {
        transition: background-color .2s, color .2s;
    }
}

/* Flèche flottante en haut à droite des cartes Réalisations */
#realisations .project-card {
    position: relative;
}

.project-card__arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--btn-silver);
    box-shadow: var(--btn-silver-shadow);
    color: var(--ink);
    background-size: 160% 160%;
    background-position: 0% 0%;
    opacity: 0;
    transition: opacity .4s cubic-bezier(0.22, 1, 0.36, 1), background-position .9s ease-in-out, transform .4s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card__arrow svg {
    width: 20px;
    height: 20px;
}

/* Le bouton apparaît au survol de la carte */
#realisations .project-card:hover .project-card__arrow,
#realisations .project-card:focus-visible .project-card__arrow {
    opacity: 1;
}

/* Au survol du bouton : reflet métallique discret qui glisse et petit déplacement */
.project-card__arrow:hover {
    background-position: 100% 100%;
    transform: translate(3px, -3px);
}

@media (hover: none) {
    .project-card__arrow {
        opacity: 1;
    }
}

/* Gradient animé de la hero (canvas WebGL) */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    /* Le canvas déborde de la hero : la mention du coin inférieur droit sort du cadre */
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    pointer-events: none;
}

/* Titres de section : même taille sur toutes les sections (plus petite sur mobile) */
:root {
    --fs-title: 44px;
}

#realisations h2 {
    font-size: var(--fs-title);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

@media (max-width: 600px) {
    :root {
        --fs-title: 34px;
    }
}

/* Mobile : les CTAs de la hero prennent toute la largeur */
@media (max-width: 600px) {
    .hero-content {
        align-items: stretch;
    }

    .hero-cta {
        width: 100%;
    }
}


/* ════════════════════════════════════════════════
   SWITCH COMPÉTENCES — pastille qui glisse (voir js/index.js)
════════════════════════════════════════════════ */
#mes-competences .approach-switch {
    position: relative;
}

#mes-competences .approach-switch__btn {
    position: relative;
    z-index: 1;
    transition: color .35s ease;
}

#mes-competences .approach-switch__btn[aria-pressed="true"] {
    background: none;
    box-shadow: none;
    color: var(--surface);
}

#mes-competences .approach-switch__thumb {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 0;
    border-radius: 16px;
    background: var(--btn-dark-metal);
    background-size: 200% 200%;
    background-position: 0% 0%;
    box-shadow: var(--btn-dark-shadow),
        inset 1px 1px 0 color-mix(in srgb, var(--surface) 35%, transparent),
        inset -1px -1px 0 color-mix(in srgb, var(--surface) 10%, transparent);
    transition: transform .45s cubic-bezier(0.22, 1, 0.36, 1), width .45s cubic-bezier(0.22, 1, 0.36, 1), background-position .6s ease-out;
    pointer-events: none;
}

#mes-competences .approach-switch:hover .approach-switch__thumb {
    background-position: 100% 100%;
}

@media (prefers-reduced-motion: reduce) {
    #mes-competences .approach-switch__thumb,
    #mes-competences .approach-switch__btn {
        transition: none;
    }
}

/* ════════════════════════════════════════════════
   SECTION CONTACT — laisse la place au footer posé par-dessus (voir global.css)
════════════════════════════════════════════════ */
#contact {
    padding-bottom: calc(100px + var(--footer-h));
}

@media (max-width: 600px) {
    #contact {
        padding-bottom: calc(72px + var(--footer-h));
    }
}

/* Mobile : titres de section en graisse 500 (sélecteurs à identifiant, plus prioritaires que h2) */
@media (max-width: 600px) {
    #apropos .about__statement,
    #mes-competences .competences__title {
        font-weight: 500;
    }
}
