/* ============================================================
   Couche de design moderne — AJAVON Ayi Daniel Portfolio
   Chargée après style.css / responsive.css
   Palette cohérente + typographie + grille homogène + cartes
   ============================================================ */

/* ---------- Typographie ---------- */
body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #E6EDF7;
}

h1, h2, h3, h4, h5, h6,
.cv_menus_wrapper .cv_menus li a,
.cv_port_tab li a {
    font-family: 'Space Grotesk', sans-serif;
}

p {
    color: var(--cv-text-muted);
    line-height: 1.75;
}

h2 { letter-spacing: -0.02em; }
h3, h4 { letter-spacing: -0.01em; }

::selection {
    background: rgba(234, 88, 12, 0.35);
    color: #fff;
}

a:focus-visible,
button:focus-visible,
.cv_toggle_btn:focus-visible {
    outline: 2px solid var(--cv-primary-color);
    outline-offset: 3px;
}

/* ---------- Palette : unification des couleurs parasites ---------- */
.cv_banner_text .cv_profile_name {
    color: var(--cv-accent-color);
}

.cv_banner_img::before {
    background: rgba(234, 88, 12, 0.32);
    border-radius: 58% 42% 55% 45% / 45% 55% 42% 58%;
    box-shadow: 0 30px 80px -20px rgba(234, 88, 12, 0.4);
    animation: cv_blob_morph 12s ease-in-out infinite alternate;
}

@keyframes cv_blob_morph {
    0%   { border-radius: 58% 42% 55% 45% / 45% 55% 42% 58%; transform: scale(1); }
    50%  { border-radius: 45% 55% 42% 58% / 55% 42% 58% 45%; transform: scale(1.03); }
    100% { border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; transform: scale(1.01); }
}

.cv_about_img .cv_about_exp {
    background: var(--cv-secoundry-color);
}

.cv_about_img .cv_about_rating {
    background: var(--cv-accent-color);
}

/* Boutons iOS : bleu uni, coins arrondis, retour visuel au survol */
.cv_btn {
    background: var(--cv-primary-color);
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    box-shadow: 0 10px 22px -10px rgba(234, 88, 12, 0.55);
    transition: all 0.25s ease;
}

.cv_btn:hover {
    background-color: var(--cv-secoundry-color);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 26px -12px rgba(234, 88, 12, 0.65);
}

.cv_btn:active {
    transform: scale(0.97);
}

.cv_about_info .cv_about_btn a:first-child {
    background: var(--cv-primary-color);
}

.cv_about_info .cv_about_btn a:first-child:hover {
    background-color: var(--cv-secoundry-color);
    color: #fff;
    border-color: transparent;
}

/* ---------- Header ---------- */
.cv_header_wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 101;
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

/* Au scroll : verre dépoli style iOS, barre plus fine */
.cv_header_wrapper.fixed {
    background: rgba(251, 247, 242, 0.85);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    padding: 7px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px -20px rgba(15, 23, 42, 0.25);
}

.cv_logo a img {
    width: 130px;
}

/* ---------- Portfolio : en-tête de page ---------- */
.cv_portfolio_heading {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.cv_portfolio_tag {
    display: inline-block;
    background: #FFF7ED;
    color: #C2410C;
    border: 1px solid rgba(194, 65, 12, 0.18);
    padding: 6px 16px;
    border-radius: 999px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px -12px rgba(194, 65, 12, 0.4);
}

.cv_portfolio_heading h2 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    position: relative;
    display: inline-block;
    text-transform: none;
}

.cv_portfolio_heading h2::before {
    position: absolute;
    content: "";
    width: 62px;
    height: 3px;
    background: var(--cv-primary-color);
    border-radius: 2px;
    top: 50%;
    left: -83px;
    display: none; /* remplacé par le tag */
}

.cv_portfolio_heading p {
    margin: 18px auto 0;
    max-width: 520px;
}

/* ---------- Portfolio : filtres ---------- */
.cv_port_tab {
    display: flex;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--cv-border-soft);
    background: rgba(255, 255, 255, 0.03);
    max-width: none;
    width: fit-content;
    margin: 0 auto 44px;
    min-height: auto;
    padding: 6px;
}

.cv_port_tab li a {
    color: var(--cv-text-muted);
    border-radius: 999px;
    background: transparent;
    padding: 9px 22px;
    min-height: auto;
    min-width: auto;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.cv_port_tab li a:hover {
    color: var(--cv-primary-color);
}

.cv_port_tab li a.active {
    background: var(--cv-primary-color);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(234, 88, 12, 0.6);
}

/* Message de succès du formulaire de contact */
.cv_contact_success {
    max-width: 540px;
    margin: 0 auto 24px;
    padding: 14px 20px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 10px 24px -16px rgba(22, 101, 52, 0.4);
}

/* ---------- Portfolio : grille homogène ---------- */
.cv_gallery_wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Cartes projets iOS : vignette + corps blanc, bordure fine */
.cv_gallery_img {
    display: block;
    width: 100%; /* neutralise le calc(25% - 15px) du template (résolu contre la piste grid → carte écrasée) */
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.cv_gallery_img:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 88, 12, 0.4);
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.45);
}

.cv_gallery_img a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.cv_gallery_thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.cv_gallery_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv_gallery_img:hover .cv_gallery_thumb img {
    transform: scale(1.06);
}

.cv_gallery_cat-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #C2410C;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.35);
}

.cv_gallery_arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cv-primary-color);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(234, 88, 12, 0.6);
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: all 0.3s ease;
}

.cv_gallery_img:hover .cv_gallery_arrow {
    opacity: 1;
    transform: none;
}

.cv_gallery_body {
    display: block;
    padding: 18px 20px 22px;
}

.cv_gallery_techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.cv_gallery_tech {
    background: #FFF7ED;
    color: #C2410C;
    border: 1px solid rgba(194, 65, 12, 0.14);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}

.cv_gallery_cat {
    display: block;
    color: #FB923C;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cv_gallery_title {
    display: block;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.3;
}

/* État vide */
.cv_portfolio_empty {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed var(--cv-border-soft);
    border-radius: 16px;
    color: var(--cv-text-muted);
}

/* ---------- Portfolio : page détail ---------- */
.cv_portfolio_detail_card {
    border-radius: 20px;
    border: 1px solid var(--cv-border-soft);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    padding: 18px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.cv_portfolio_detail_card img {
    border-radius: 14px;
    width: 100%;
    object-fit: cover;
}

.cv_portfolio_detail_body {
    border-radius: 20px;
    border: 1px solid var(--cv-border-soft);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    padding: 44px 48px;
}

.cv_portfolio_detail_body h3 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: none;
}

.cv_portfolio_detail_body .cv_portfolio_detail_desc {
    margin-top: 18px;
    font-size: 16px;
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--cv-border-soft);
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta li {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    font-size: 15px;
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta li strong {
    min-width: 120px;
    color: var(--cv-primary-color);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta li span {
    color: #E6EDF7;
    word-break: break-word;
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta li span a {
    color: var(--cv-primary-color);
    font-weight: 500;
}

.cv_portfolio_detail_body .cv_portfolio_detail_meta li span a:hover {
    color: var(--cv-secoundry-color);
}

.cv_portfolio_detail_btn {
    margin-top: 28px;
    display: inline-flex;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .cv_gallery_wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .cv_gallery_wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cv_gallery_title {
        font-size: 17px;
    }

    .cv_portfolio_detail_body {
        padding: 28px 22px;
    }
}

@media (max-width: 575.98px) {
    .cv_gallery_wrapper {
        grid-template-columns: 1fr;
    }

    .cv_port_tab {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 24px;
    }
}

/* ============================================================
   THÈME CLAIR (unique — le sombre a été retiré)
   ============================================================ */
html[data-theme="light"] {
    --cv-text-muted: #475569;
    --cv-border-soft: rgba(15, 23, 42, 0.12);
    --cv-bg-deep: #F1F5F9;
}

html[data-theme="light"] body {
    background: #FBF7F2;
    color: #0F172A;
}

html[data-theme="light"] .cv_main_wrapper {
    background: #FBF7F2;
}

html[data-theme="light"] p {
    color: #475569;
}

html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5 {
    color: #0F172A;
}

/* Loader */
html[data-theme="light"] .loader {
    background: #FBF7F2;
}

/* Menu plein écran */
html[data-theme="light"] .cv_header_menu,
html[data-theme="light"] .menu-open .cv_header_menu {
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(12px);
}

html[data-theme="light"] .cv_menus_wrapper .cv_menus li a {
    color: #0F172A;
}

html[data-theme="light"] .line {
    stroke: #334155;
}

/* Logo (le logo est clair — on le fonce) */
html[data-theme="light"] .cv_logo a img {
    filter: brightness(0) opacity(0.85);
}

/* Footer */
html[data-theme="light"] .cv_footer_wrapper {
    background: #FFFFFF;
}

html[data-theme="light"] .cv_footer_text p {
    color: #64748B;
}

/* Banner accueil */
html[data-theme="light"] .cv_banner_wrapper {
    background: #FFF7ED;
}

html[data-theme="light"] .cv_banner_wrapper::before {
    display: none;
}

html[data-theme="light"] .cv_banner_text h1 {
    color: #0F172A;
}

html[data-theme="light"] .cv_banner_text .cv_profile_name {
    color: var(--cv-primary-color);
}

/* Badge "Développeur Full Stack" : texte blanc sur fond orange */
html[data-theme="light"] .cv_banner_text h5 {
    color: #FFFFFF;
}

/* Badge expérience "2+ Ans" : bloc professionnel */
.cv_about_img .cv_about_exp {
    padding: 18px 26px;
    max-width: 340px;
    gap: 0;
    left: -25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 24px 45px -20px rgba(194, 65, 12, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.cv_about_img .cv_about_exp h2 {
    font-size: 54px;
    line-height: 1;
    margin: 0;
    padding-right: 18px;
}

.cv_about_img .cv_about_exp span {
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cv_about_img .cv_about_exp p {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 13px;
}

html[data-theme="light"] .cv_about_img .cv_about_exp h2,
html[data-theme="light"] .cv_about_img .cv_about_exp p {
    color: #FFFFFF;
}

html[data-theme="light"] .cv_banner_box {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #E5E7EB;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.15);
}

/* About */
html[data-theme="light"] .cv_about_wrapper {
    background-image: none;
    background: #FBF7F2;
}

html[data-theme="light"] .cv_about_wrapper::before {
    display: none;
}

html[data-theme="light"] .cv_about_box {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
}

/* Éducation : numéros fantômes */
html[data-theme="light"] .cv_edu_title h3 {
    color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .cv_edu_box:hover,
html[data-theme="light"] .cv_exp_box:hover,
html[data-theme="light"] .cv_do_box:hover,
html[data-theme="light"] .cv_address_box:hover,
html[data-theme="light"] .cv_skill_box:hover {
    border-color: rgba(15, 23, 42, 0.15);
}

/* Expérience */
html[data-theme="light"] .cv_experience_wrapper {
    background-image: none;
    background: #FBF7F2;
}

html[data-theme="light"] .cv_experience_wrapper::before {
    display: none;
}

html[data-theme="light"] .cv_exp_box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 16px 38px -30px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .cv_exp_box h2::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0) 0%, #64748B 50.52%, rgba(15, 23, 42, 0) 100%);
}

/* Compétences : ce que je fais */
html[data-theme="light"] .cv_do_wrapper {
    background-image: none;
    background: #FBF7F2;
}

html[data-theme="light"] .cv_do_box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 16px 38px -30px rgba(15, 23, 42, 0.18);
}

/* Chiffres clés */
html[data-theme="light"] .cv_award_wrapper {
    background-image: none;
}

html[data-theme="light"] .cv_award_wrapper::before {
    display: none;
}

html[data-theme="light"] .cv_award_box {
    background-image: none;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.2);
}

/* Barres de compétences */
html[data-theme="light"] .cv_skill_box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 16px 38px -30px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .cv_skill_text p {
    color: #0F172A;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .cv_skill_bar .progress {
    background: rgba(15, 23, 42, 0.1);
}

/* Photo « Ce que je fais » : coins arrondis à toutes les largeurs d'écran */
.cv_do_img img {
    border-radius: 20px;
}

/* Portfolio */
html[data-theme="light"] .cv_portfolio_wrapper {
    background-image: none;
    background: #FBF7F2;
}

html[data-theme="light"] .cv_port_tab {
    background: rgba(255, 255, 255, 0.85);
    border-color: #E5E7EB;
}

html[data-theme="light"] .cv_port_tab li a {
    background: #FFF7ED;
    color: #C2410C;
}

html[data-theme="light"] .cv_port_tab li a.active {
    background: var(--cv-primary-color);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(234, 88, 12, 0.6);
}

html[data-theme="light"] .cv_portfolio_heading h2 {
    color: #0F172A;
}

html[data-theme="light"] .cv_portfolio_heading p {
    color: #475569;
}

/* Contact */
html[data-theme="light"] .cv_address_wrapper {
    background-image: none;
}

html[data-theme="light"] .cv_address_wrapper::before {
    display: none;
}

html[data-theme="light"] .cv_address_box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 16px 38px -30px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .cv_address_text a {
    color: #0F172A;
}

html[data-theme="light"] .cv_contact_form input,
html[data-theme="light"] .cv_contact_form textarea {
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0F172A;
    background: rgba(255, 255, 255, 0.8);
}

/* Page contact : le formulaire épouse son contenu (le 100vh du thème créait un grand vide en bas) */
.cv_form_wrapper .cv_contact_form {
    height: auto;
}

/* Page détail projet */
html[data-theme="light"] .cv_portfolio_detail_card,
html[data-theme="light"] .cv_portfolio_detail_body {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 20px 45px -28px rgba(15, 23, 42, 0.2);
}

html[data-theme="light"] .cv_portfolio_detail_body h3 {
    color: #0F172A;
}

html[data-theme="light"] .cv_portfolio_detail_body .cv_portfolio_detail_meta li span {
    color: #334155;
}

/* Cartes projet iOS en clair : fond blanc + bordure #E5E7EB */
html[data-theme="light"] .cv_gallery_img {
    background: #FFFFFF;
    border-color: #E5E7EB;
}

html[data-theme="light"] .cv_gallery_img:hover {
    border-color: rgba(234, 88, 12, 0.35);
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .cv_gallery_title {
    color: #0F172A;
}

html[data-theme="light"] .cv_gallery_cat {
    color: var(--cv-primary-color);
}

/* ============================================================
   HERO ACCUEIL — ambiance moderne (halos, particules, badge)
   ============================================================ */

/* Le contenu du banner passe au-dessus des halos / particules */
.cv_banner_wrapper .cv_container {
    position: relative;
    z-index: 1;
}

/* ---------- Halos lumineux ---------- */
.cv_halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.cv_halo--1 {
    width: 460px;
    height: 460px;
    left: -120px;
    top: -100px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.5) 0%, transparent 70%);
    animation: cv_halo_drift 14s ease-in-out infinite alternate;
}

.cv_halo--2 {
    width: 400px;
    height: 400px;
    right: 6%;
    bottom: -140px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.4) 0%, transparent 70%);
    animation: cv_halo_drift 18s ease-in-out infinite alternate-reverse;
}

.cv_halo--3 {
    width: 300px;
    height: 300px;
    left: 38%;
    top: 52%;
    background: radial-gradient(circle, rgba(194, 65, 12, 0.32) 0%, transparent 70%);
    animation: cv_halo_drift 22s ease-in-out infinite alternate;
}

@keyframes cv_halo_drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(45px, 30px) scale(1.18); }
}

/* ---------- Hero : 100vh exact sur desktop (colonnes côte à côte) ---------- */
@media (min-width: 1200px) {
    .cv_banner_wrapper {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        padding: 110px 0 40px;
    }

    .cv_banner_wrapper .cv_container {
        width: 100%;
        height: calc(100vh - 150px);
    }

    .cv_banner_wrapper .cv_container .row {
        height: 100%;
    }

    .cv_banner_wrapper .cv_container .row .col-xl-6 {
        min-height: 0;
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .cv_banner_text {
        margin-top: 0;
    }

    .cv_banner_img .bnr-boy {
        height: calc(100vh - 150px);
    }

    /* Compaction : tout doit tenir dans l'écran */
    .cv_banner_text h5 {
        font-size: 14px;
        padding: 6px 18px;
        margin-bottom: 12px;
    }

    .cv_banner_text h1 {
        font-size: 52px;
        min-height: 58px;
    }

    .cv_banner_text a {
        margin: 16px 0 22px;
    }

    .cv_banner_box {
        padding: 20px 24px;
    }

    .cv_banner_box p {
        font-size: 14.5px;
        line-height: 1.6;
    }

    /* La photo et le blob se fondent en bas : plus de bord dur */
    .cv_banner_img .bnr-boy,
    .cv_banner_img::before {
        -webkit-mask-image: linear-gradient(180deg, #000 92%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 92%, transparent 100%);
    }
}

/* ---------- Hero 992-1199px : photo compacte, pas de page géante ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .cv_banner_wrapper {
        padding: 100px 0 40px;
    }

    .cv_banner_img .bnr-boy {
        height: 62vh;
    }
}

/* Lueur orangée douce en bas du hero (là où la photo se fond) */
.cv_banner_wrapper::after {
    content: "";
    position: absolute;
    left: 2%;
    bottom: -170px;
    width: 560px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.32) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Photo : flottement doux ---------- */
.cv_banner_img .bnr-boy {
    animation: cv_photo_float 6s ease-in-out infinite;
}

@keyframes cv_photo_float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

/* ---------- Badge flottant sur la photo ---------- */
.cv_banner_badge {
    position: absolute;
    z-index: 3;
    top: 16%;
    right: 2%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 17px;
    border-radius: 50px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #E6EDF7;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55);
    animation: cv_badge_float 4s ease-in-out infinite;
}

.cv_banner_badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #F97316;
    flex-shrink: 0;
    animation: cv_pulse 2s ease-out infinite;
}

@keyframes cv_badge_float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-11px); }
}

@keyframes cv_pulse {
    0%   { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* Mobile/tablette : le badge descend en bas de la photo, hors du visage */
@media (max-width: 991px) {
    .cv_banner_badge {
        top: auto;
        bottom: 8%;
        right: auto;
        left: 8%;
        font-size: 12px;
        padding: 9px 14px;
    }
}

/* ---------- Thème clair : adaptation halos / particules / badge ---------- */
html[data-theme="light"] .cv_halo--1 {
    background: radial-gradient(circle, rgba(253, 186, 116, 0.7) 0%, transparent 70%);
}

html[data-theme="light"] .cv_halo--2 {
    background: radial-gradient(circle, rgba(254, 215, 170, 0.6) 0%, transparent 70%);
}

html[data-theme="light"] .cv_halo--3 {
    background: radial-gradient(circle, rgba(251, 146, 60, 0.5) 0%, transparent 70%);
}

html[data-theme="light"] .cv_banner_badge {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0F172A;
    box-shadow: 0 14px 34px -14px rgba(15, 23, 42, 0.3);
}

/* ---------- Accessibilité : pas d'animation si demandé ---------- */
@media (prefers-reduced-motion: reduce) {
    .cv_halo,
    .cv_banner_img::before,
    .cv_banner_img .bnr-boy,
    .cv_banner_badge,
    .cv_banner_badge-dot {
        animation: none !important;
    }
}

/* Respect de la préférence d'accessibilité (cartes portfolio) */
@media (prefers-reduced-motion: reduce) {
    .cv_gallery_img,
    .cv_gallery_img a img,
    .cv_gallery_img .cv_gallery_hover,
    .cv_gallery_arrow {
        transition: none;
    }
}

/* ============================================================
   NAVIGATION DESKTOP — liens dans la barre, hamburger mobile
   ============================================================ */
.cv_nav_menu {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv_nav_menu a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(230, 237, 247, 0.82);
    text-decoration: none;
    position: relative;
    padding: 4px 2px;
    transition: color 0.3s ease;
}

.cv_nav_menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--cv-primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cv_nav_menu a:hover {
    color: #FFFFFF;
}

.cv_nav_menu a:hover::after,
.cv_nav_menu a.active::after {
    transform: scaleX(1);
}

.cv_nav_menu a.active {
    color: #FFFFFF;
}

/* Espacement réduit sur les écrans intermédiaires */
@media (min-width: 992px) and (max-width: 1199px) {
    .cv_nav_menu {
        gap: 22px;
    }

    .cv_nav_menu a {
        font-size: 14px;
    }
}

/* Thème clair */
html[data-theme="light"] .cv_nav_menu a {
    color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] .cv_nav_menu a:hover,
html[data-theme="light"] .cv_nav_menu a.active {
    color: #0F172A;
}

/* ============================================================
   CHIPS TECHNOLOGIES (page détail projet) — style badge iOS
   ============================================================ */
.cv_tech_chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv_portfolio_detail_meta li .cv_tech_chips .cv_tech_chip {
    background: rgba(234, 88, 12, 0.12);
    color: #FDBA74;
    border: 1px solid rgba(234, 88, 12, 0.25);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

html[data-theme="light"] .cv_portfolio_detail_meta li .cv_tech_chips .cv_tech_chip {
    background: #FFF7ED;
    color: #C2410C;
    border: 1px solid rgba(194, 65, 12, 0.15);
}

/* Mobile / tablette : on garde le hamburger + menu plein écran */
@media (max-width: 991px) {
    .cv_nav_menu {
        display: none;
    }
}

/* Desktop : le hamburger et le menu plein écran ne servent plus */
@media (min-width: 992px) {
    .cv_toggle_btn {
        display: none;
    }

    .cv_header_menu {
        display: none;
    }
}
