/* ======================================================
   0) Variables globales
   ====================================================== */
:root {
    --primary-color: lightgray;
    --small-marges: 1%;
    --font-ui: "Inter", system-ui, sans-serif;
    --font-brand: "Unbounded", var(--font-ui);
    --brand: #787cbe;
    --accent: #f73a00;
    --font-script: "Caveat", "Segoe Script", "Comic Sans MS", cursive;
    --blue-color: #1a2238;

    /* Nav (desktop par défaut) */
    --nav-h: 72px;
    --nav-gap: 18px;
    --nav-font: 17px;
    --brand-size: 22px;
    --nav-icon: 42px;
    /* logo */
    --burger-size: 60px;
    /* burger */
    --account-size: 34px;

    /* compte */
    --page-gap: 18px;
    --header-offset: 0px;

}

/* breakpoints */
@media (max-width:1100px) {
    :root {
        --nav-h: 64px;
        --nav-gap: 16px;
        --nav-font: 16px;
        --brand-size: 20px;
        --nav-icon: 38px;
        --burger-size: 50px;
        --account-size: 32px;
    }
}

@media (max-width:680px) {
    :root {
        --nav-h: 56px;
        --nav-gap: 14px;
        --nav-font: 15px;
        --brand-size: 18px;
        --nav-icon: 34px;
        --burger-size: 44px;
        --account-size: 30px;
    }
}

/* ======================================================
   1) Bases (éléments HTML)
   ====================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #fff;
}

h2 {
    color: var(--blue-color);
}

h3 {
    color: var(--blue-color);
}

h4 {
    font-size: 1rem;
    font-weight: normal;
    margin-left: var(--small-marges);
}

p {
    margin-left: calc(var(--small-marges)*1.8);
    line-height: 1.5;
    text-align: justify;
}

a {
    font-size: 16px;
    color: #000;
    text-decoration: none;
}

a:hover {
    color: #007bff;
}

button {
    display: inline-block;
    cursor: pointer;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    color: #fff;
    background: var(--blue-color);
    border: 2px solid #959697;
    border-radius: .5rem;
    transition: background-color .2s, border-color .2s;
}

button:hover {
    background: #197095;
    border-color: #959697;
}

/* Les images ne dépassent jamais leur conteneur */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Buttons (canonique) — À GARDER UNE SEULE FOIS === */
.btn-primary {
    padding: .75rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--blue-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

.btn-primary:hover {
    background: #000
}

.btn-light {
    padding: .6rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: var(--blue-color);
    font-weight: 600
}

.btn-danger {
    padding: .75rem 1rem;
    border: 0;
    border-radius: 10px;
    background: #cf4f4f;
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

.btn-danger:hover {
    background: #dc2626
}

.btn-block {
    width: 100%
}


/* ======================================================
   2) Typo & marque
   ====================================================== */


.brand h1 {
    font-family: var(--font-brand);
    font-weight: 800;
    letter-spacing: .015em;
    color: var(--brand);
    line-height: 1;
    font-size: 1.7rem;
}

.brand.layers h1 {
    position: relative;
    display: inline-block;
}

.brand.layers::before h1 {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    transform: translate(2px, 3px);
    color: transparent;
    -webkit-text-stroke: 2px currentColor;
    opacity: .25;
}

.brand.caps h1 {
    text-transform: uppercase;
    letter-spacing: .02em;
}

a.brand:hover h1 {
    color: var(--accent);
}

/* ======================================================
   3) Bandeau héro (accueil)
   ====================================================== */

.main-header {
    position: relative;
    background: url('/images/images-for-site/image_split-screen_accueil.jpg') center top / 100vw auto no-repeat;
    aspect-ratio: 1385/1024;
    /* réserve la hauteur de l’image */
}

.main-header .mid-title {
    position: absolute;
    left: 20px;
    bottom: 0;
    color: #f5f5f5;
    font-size: 18px;
    text-align: left;
}

.main-header a {
    padding: 5px;
    color: #fff;
}

/* ======================================================
   4) Navigation
   ====================================================== */

/* — Accueil : barre .site-nav sur le hero — */
.site-nav {
    position: relative;
    top: 0;
    z-index: 30;
    height: var(--nav-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    margin-bottom: var(--page-gap);
    /* espace sous la nav d'accueil */
}

.site-nav .title {
    flex: 1;
    text-align: left;
}

/* Titre "Koncept3D" simplifié (même esprit que le reste du site) */
.site-nav .title .brand {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--brand-size);
    letter-spacing: .01em;
    text-transform: none;
    color: #fff;
    text-shadow: none;
}

/* coupe l’effet “layers” (contour) sur l’accueil */
.site-nav .title .brand.layers::before {
    content: none;
}

@media (max-width:860px) {
    .site-nav .right a {
        display: none;
    }
}


.site-nav .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Couleur + typo harmonisées */
.site-nav .center-links a,
.site-nav .right>a,
.site-nav .right>button {
    color: #eef6ff;
    font-family: var(--font-ui);
    font-weight: 500;
}

/* reset halos pour les icônes */
.icon-btn,
#btn-home,
#btn-burger,
#btn-account {
    position: relative;
    z-index: 10001;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
    outline: none;
}

.icon-btn:focus,
#btn-home:focus,
#btn-burger:focus,
#btn-account:focus {
    outline: none;
    box-shadow: none;
}

/* Logo (accueil) */
#btn-home {
    width: var(--nav-icon);
    height: var(--nav-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: url('/images/logo/logo.png') center/contain no-repeat;
}

/* Burger (accueil, blanc) */
#btn-burger {
    width: var(--burger-size);
    height: var(--burger-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#btn-burger .burger-mask {
    width: calc(var(--burger-size)*0.74);
    height: calc(var(--burger-size)*0.56);
    display: block;
    background-color: #fff;
    /* blanc sur hero sombre */
    -webkit-mask: url('/images/icons/menu-burger.png') center/contain no-repeat;
    mask: url('/images/icons/menu-burger.png') center/contain no-repeat;
}

@supports not ((-webkit-mask: none) or (mask: none)) {
    #btn-burger .burger-mask {
        background: url('/images/icons/menu-burger.png') center/contain no-repeat;
        filter: brightness(0) invert(1);
    }
}

/* Icône compte (accueil) */
.site-nav #btn-account {
    width: var(--account-size);
    height: var(--account-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    -webkit-mask: url('/images/logo/utilisateur.png') center/contain no-repeat;
    mask: url('/images/logo/utilisateur.png') center/contain no-repeat;
}

/* Panier (accueil) */
.site-nav #btn-cart {
    padding: 6px 12px;
    font-size: calc(var(--nav-font) - 1px);
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    color: #eef6ff;
}

/* — Pages internes : header clair .second-header — */
.second-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #ffffffcc;
    backdrop-filter: saturate(180%) blur(6px);
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: var(--page-gap);
}

.second-header .header {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.second-header .brand h1 {
    color: #000;
}

.second-header .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.second-header #btn-home {
    width: 40px;
    height: 40px;
    background: url('/images/logo/logo.png') center/contain no-repeat;
}

/* Burger noir sur header blanc */
.second-header #btn-burger {
    width: var(--nav-icon);
    height: var(--nav-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    outline: none;
}

.second-header #btn-burger .burger-mask {
    width: calc(var(--nav-icon)*0.74);
    height: calc(var(--nav-icon)*0.56);
    display: block;
    background-color: #111;
    /* noir */
    -webkit-mask: url('/images/icons/menu-burger.png') center/contain no-repeat;
    mask: url('/images/icons/menu-burger.png') center/contain no-repeat;
}

@supports not ((-webkit-mask: none) or (mask: none)) {
    .second-header #btn-burger .burger-mask {
        background: url('/images/icons/menu-burger.png') center/contain no-repeat;
        filter: brightness(0);
    }
}

/* Icône compte (noire) */
.second-header #btn-account {
    width: 32px;
    height: 32px;
    background: none;
    background-color: #111;
    -webkit-mask: url('/images/logo/utilisateur.png') center/contain no-repeat;
    mask: url('/images/logo/utilisateur.png') center/contain no-repeat;
}

/* Panier noir + badge rouge */
.second-header #btn-cart {
    padding: 8px 14px;
    border-radius: 999px;
    border: 0;
    background: #111;
    color: #fff;
    font-weight: 600;
}

.second-header #btn-cart .badge {
    margin-left: 8px;
    background: #ef4444;
}

/* Retire tout halo focus ‘par défaut’ sur les icônes */
.second-header #btn-burger:focus,
.second-header #btn-home:focus,
.second-header #btn-account:focus,
.second-header #btn-cart:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 680px) {

    /* On cache les liens texte dans le header "second-header" */
    .second-header .right a {
        display: none;
    }
}

@media (max-width: 400px) {

    .second-header .header {
        /* On réduit les espaces sur les côtés */
        padding-left: 10px;
        padding-right: 10px;

        /* On réduit l'espace entre les icônes de gauche */
        gap: 10px;
    }

    .second-header .title {
        /* On cache le titre "Koncept3D", le logo suffit */
        display: none;
    }

    .second-header .right {
        /* On réduit l'espace entre Panier et Compte */
        gap: 10px;
    }
}

/* ======================================================
   5) Menu latéral (drawer)
   ====================================================== */
.drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 300px;
    max-width: 86vw;
    background: #fff;
    color: #111;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    top: var(--header-offset);
    bottom: 0;
    left: 0;
    height: calc(100vh - var(--header-offset));
}

.drawer.open {
    transform: translateX(0);
}

.drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.drawer__links {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.drawer__links a {
    display: block;
    padding: 12px 16px;
    color: inherit;
}

.drawer__links a:hover {
    background: #f5f7fb;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, .35);
    top: var(--header-offset);
    height: calc(100vh - var(--header-offset));
}

.backdrop[hidden] {
    display: none;
}

body:has(.site-nav) {
    --header-offset: var(--nav-h);
}

body:has(.second-header) {
    --header-offset: 64px;
}


/* ======================================================
   6) Popups, toasts & badges
   ====================================================== */
.popup {
    display: none;
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.popup.active {
    display: block;
}

.popup button {
    display: block;
    width: 100%;
    padding: 6px 10px;
    text-align: left;
    cursor: pointer;
}

#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    background: rgba(0, 0, 0, .8);
    color: #fff;
    padding: .75rem 1rem;
    margin-bottom: .5rem;
    border-radius: .375rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    opacity: 1;
    transform: translateX(100%);
    animation: slide-in .3s forwards, fade-out .3s forwards 2.7s;
}

@keyframes slide-in {
    to {
        transform: translateX(0);
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

.badge {
    background: red;
    color: #fff;
    border-radius: 50%;
    padding: .2em .5em;
    margin-left: .3em;
    font-size: .8em;
    vertical-align: middle;
}

#account-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10000;
    display: none;
    width: 220px;
    max-width: min(86vw, 260px);
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    padding: 8px;
    color: #111;
    text-shadow: none;
}

#account-popup.active {
    display: block;
}

#account-popup button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin: 6px 0;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #111 !important;
}

#account-popup button:hover {
    background: #eef2f7;
    border-color: #d6dae1;
}

#btn-account {
    position: relative;
    z-index: 10001;
}

.site-nav .right,
.second-header .right {
    position: relative;
    overflow: visible;
}

/* ======================================================
   7) Layout principal
   ====================================================== */
main {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== Processus complet ===== */
.processus-complet h2,
.carousel h2 {
    font-size: 2rem;
    margin: 10px;
    text-align: left;
}

.processus-complet>div {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.processus-complet>div .icon {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    margin-right: 2rem;
    border-radius: 10%;
    overflow: hidden;
    background: none;
}

.processus-complet>div .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.processus-complet>div h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.processus-complet>div h4 {
    margin: .5rem 0 0;
    font-weight: 400;
    line-height: 1.4;
    color: #444;
}

.processus-complet>div .content button {
    margin-top: 1rem;
}

.processus-complet>div button {
    margin-left: auto;
    background: var(--blue-color);
    border: none;
    border-radius: 4px;
    padding: .6rem 1.2rem;
    font-size: .95rem;
    transition: background .2s;
}

.processus-complet>div button:hover {
    background: #7bb8da;
}

/* ===== KPIs (chiffres clés) ===== */
.kpis {
    margin: 12px 0 28px;
    display: grid;
    grid-template-columns: 240px 1fr 1fr 1fr;
    gap: clamp(10px, 2vw, 28px);
    align-items: center;
    background: #f5f6f8;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: clamp(12px, 2.4vw, 22px);
}

.kpi-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.kpi-flag img {
    max-width: 140px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.kpi {
    text-align: center;
}

.kpi__value {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(32px, 4vw, 42px);
    color: var(--blue-color);
    margin: 0;
    letter-spacing: .5px;
}

.kpi__label {
    font-family: var(--font-ui);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(14px, 2vw, 18px);
    color: var(--blue-color);
    margin: 6px 0 0;
}

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

    .kpi-flag {
        height: auto;
        margin-bottom: 2px;
    }

    .kpi-flag img {
        max-width: 120px;
        margin: 0 auto;
    }
}

/* ===== Carousel ===== */
.carousel {
    position: relative;
    text-align: center;
    margin: 2em 0;
}

.carousel h4 {
    text-align: left;
}

.carousel__viewport {
    overflow: hidden;
    margin: 1em auto;
    width: 80%;
}

.carousel__viewport h3 {
    font-size: 1rem;
}

.carousel__track {
    display: flex;
    transition: transform .4s ease;
}

.carousel__item {
    flex: 0 0 33.333%;
    box-sizing: border-box;
    padding: .5em;
}

.carousel__item img {
    width: 100%;
    max-height: 170px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 1px solid #555;
    aspect-ratio: 6 / 4;
}

.carousel__item .price {
    margin: .5em 0;
    font-weight: bold;
}

.carousel__item .add-to-cart {
    display: block;
    margin: auto;
    padding: .5em 1em;
    background: var(--blue-color);
    color: #fff;
    border: none;
    cursor: pointer;
}

.carousel__prev,
.carousel__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    font-size: 2em;
    width: 1.4em;
    height: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.carousel__prev {
    left: .5em;
}

.carousel__next {
    right: .5em;
}

.carousel__view-all {
    margin-top: .5em;
    background: #4e4e4e;
    color: #fff;
    border: none;
    padding: .5em 1em;
    cursor: pointer;
}

/* ===== FAQ + Contact ===== */
.questions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-areas:
        "title title"
        "faq   contact";
    gap: 22px;
    align-items: stretch;
}

.questions>h2 {
    grid-area: title;
    margin: 0 0 10px;
    text-align: center;
}

.questions .faq {
    grid-area: faq;
}

.questions .contact {
    grid-area: contact;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.faq details {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .9rem 1rem;
    margin: .6rem 0;
    background: #fff;
}

.faq summary {
    font-weight: 800;
}

.faq summary::after {
    content: "›";
    float: right;
    transition: transform .2s;
    color: #9ca3af;
    font-size: 1.2em;
    line-height: 1;
}

.faq details[open] summary::after {
    transform: rotate(90deg);
}

@media (max-width: 780px) {

    /* Force le conteneur principal à passer en colonne */
    .processus-complet>div {
        flex-direction: column;
        /* L'image et le texte s'empilent */
        text-align: center;
        /* Centre tout le texte */
    }

    /* Ajuste l'icône/image pour la mettre au-dessus du texte */
    .processus-complet>div .icon {
        /* Retire les marges de séparation latérales inutiles */
        margin-left: 0;
        margin-right: 0;
        /* Ajoute une marge pour séparer l'icône du texte en dessous */
        margin-bottom: 1.5rem;
    }

    /* Le contenu du texte prend toute la largeur */
    .processus-complet>div .content {
        /* Assure que le texte s'étale bien */
        max-width: 100%;
        padding: 0;
    }

    /* Uniformisation FINALE et FORCÉE des polices de service */
    .processus-complet .Briefing h2,
    .processus-complet .Modélisation h2,
    .processus-complet .Impression h2 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    /* RÈGLE D'UNIFORMISATION TOTALE ET DÉFINITIVE */
    .processus-complet .Briefing .content h4,
    .processus-complet .Modélisation .content h4,
    .processus-complet .Impression .content h4 {
        /* On réinitialise TOUT pour forcer un rendu identique */
        font-family: Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        /* 400 = 'normal'. On le force. */
        font-style: normal !important;
        color: #444 !important;
        line-height: 1.5 !important;
        letter-spacing: normal !important;
        text-transform: none !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* --- Section FAQ --- */
    section.questions .faq summary {
        font-size: 16px !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        line-height: 1.4;
    }

    section.questions .faq summary::after {
        float: none;
    }

    section.questions .faq div p {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
}

@media (max-width:980px) {
    .questions {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "faq"
            "contact";
    }

    .questions .contact {
        align-self: auto;
    }
}


/* ======================================================
   8) Formulaires & compte
   ====================================================== */
/* ======================================================
   AUTH PAGES (register + login) — BLOC COMPLET
   ====================================================== */
.auth-page {
    max-width: 960px;
    margin: 1.8rem auto 2.2rem;
    padding: 0 1rem;
}

.auth-title {
    margin: .2rem 0 1.1rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue-color);
    text-align: center;
}

.auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
    display: grid;
    gap: 12px;
}

.auth-section-title {
    margin: .4rem 0 .2rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--blue-color);
}

/* Inputs (mêmes styles que .co-form/.account-page) */
.auth-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    height: 48px;
}

.auth-card input:focus {
    outline: 0;
    border-color: var(--blue-color);
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .08);
}

/* Grilles rapides */
.grid-3 {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

.grid-2-1 {
    display: grid;
    gap: 12px;
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 900px) {

    .grid-3,
    .grid-2,
    .grid-2-1 {
        grid-template-columns: 1fr;
    }
}

/* Mot de passe + bouton œil */
.password-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.password-wrapper input {
    flex: 1;
}

.password-wrapper .toggle-pass,
#toggle-password {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: var(--blue-color);
    color: #fff;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    line-height: 1;
    font-size: 18px;
}

.password-wrapper .toggle-pass:hover,
#toggle-password:hover {
    background: #000;
}

/* Actions */
.auth-actions {
    margin-top: 4px;
}

.auth-actions.two {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

@media (max-width:560px) {
    .auth-actions.two {
        grid-template-columns: 1fr;
    }
}

.btn-block {
    width: 100%;
}

/* Liens et aide */
.link-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.forgot-row {
    margin: .2rem 0 0;
    text-align: left;
}

.forgot-row a,
.link-row a {
    color: var(--blue-color);
    font-weight: 700;
    text-decoration: none;
}

.forgot-row a:hover,
.link-row a:hover {
    text-decoration: underline;
}

/* Accessibilité : label masqué visuellement */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Option : resserrer légèrement le card sur très grands écrans */
@media (min-width:1200px) {
    .auth-card {
        padding: 22px;
    }
}

/* ===========================
   Custom Order v2 (bleu/noir)
   =========================== */
.custom-page {
    max-width: 1000px;
    margin: 1.8rem auto;
    padding: 0 1rem 2rem
}

.cp-title {
    margin: .2rem 0 1rem;
    font-size: 2rem;
    color: var(--blue-color)
}

.cp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .06)
}

.cp-note {
    margin: .25rem 0 1rem;
    color: var(--blue-color);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: .65rem .85rem
}

.co-grid {
    display: grid;
    grid-template-columns: 1.65fr .85fr;
    gap: 18px
}

@media (max-width:980px) {
    .co-grid {
        grid-template-columns: 1fr
    }
}

.co-form .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px
}

.co-form .full {
    grid-column: 1/-1
}

.co-form input,
.co-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff
}

.co-form textarea {
    min-height: 140px;
    resize: vertical
}

.co-form input:focus,
.co-form textarea:focus {
    outline: 0;
    border-color: var(--blue-color);
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .08)
}

.co-form .field-label {
    display: block;
    margin: 6px 0 6px;
    color: #334155;
    font-size: .95rem;
    font-weight: 700
}

.co-form .sec-title {
    margin: .3rem 0 .4rem;
    font-size: 1.05rem;
    color: var(--blue-color);
    font-weight: 800
}

.st-row .st-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.st-row input[type="url"] {
    flex: 1 1 420px;
    min-width: 240px
}

.hint {
    color: #6b7280;
    font-size: .88rem
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px
}

.choice {
    position: relative
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.choice label {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease, color .12s ease
}

.choice .title {
    font-weight: 800;
    color: var(--blue-color)
}

.choice input:checked+label {
    background: var(--blue-color);
    color: #fff;
    border-color: var(--blue-color);
    box-shadow: 0 8px 20px rgba(17, 24, 39, .15)
}

.choice input:checked+label .title {
    color: #fff
}

.choice.color label .swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    display: inline-block
}

.co-aside {
    position: sticky;
    top: calc(var(--header-offset) + 12px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.preview-card,
.tip-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04)
}

.preview-card h4,
.tip-card h4 {
    margin: .2rem 0 .6rem;
    color: var(--blue-color)
}

.color-preview {
    min-height: 170px;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc
}

.color-preview img {
    max-width: 100%;
    border-radius: 10px
}

.preview-empty {
    color: #64748b;
    font-size: .93rem
}

.captcha-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 6px
}

.co-form .actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px
}


/* ===========================
   Account page (pro, bleu/noir) — REMPLACEMENT COMPLET
   =========================== */
.account-page {
    max-width: 960px;
    margin: 1.8rem auto;
    padding: 0 1rem 2rem;
}

.account-page .a-title {
    margin: .2rem 0 1rem;
    font-size: 2rem;
    color: var(--blue-color);
}

.account-page .a-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    margin-bottom: 16px;
}

.account-page .a-subtitle {
    margin: .25rem 0 12px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--blue-color);
}

/* Grille fluide 2–3 colonnes */
.account-page .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    align-items: start;
}

.account-page .full-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-page input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
}

.account-page input:focus {
    outline: 0;
    border-color: var(--blue-color);
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .08);
}

/* Label à gauche du bouton "Modifier" */
.account-page .field-label {
    color: #6b7280;
    font-size: .95rem;
}

/* Bouton-lien (discret) */
.account-page .btn-text {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-weight: 700;
    color: var(--blue-color);
}

.account-page .btn-text:hover {
    text-decoration: underline;
}

/* Section d’édition du mot de passe */
.account-page .pwd-section[hidden] {
    display: none;
}

.account-page .pwd-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    padding: 12px;
    margin: 10px 0 4px;
}

.account-page .pwd-section legend {
    font-weight: 800;
    font-size: .95rem;
    color: var(--blue-color);
    padding: 0 6px;
}

/* Input + œil */
.account-page .password-wrapper {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    gap: 6px;
    margin: 6px 6px 6px 0;
}

.account-page .password-wrapper .toggle-pass {
    width: 40px;
    min-width: 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: var(--blue-color);
    color: #fff;
    cursor: pointer;
}

.account-page .password-wrapper .toggle-pass:hover {
    background: #000;
}

.account-page .pwd-actions {
    margin-top: 6px;
}

/* Actions du formulaire */
.account-page .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Zone danger visuellement séparée */
.account-page .danger-zone {
    border-style: dashed;
}


/* ======================================================
   14) Checkout — layout + cartes + liste — REMPLACEMENT COMPLET
   ====================================================== */
.checkout-page {
    max-width: 1100px;
    margin: 1.5rem auto 2rem;
    padding: 0 1rem;
}

.checkout-title {
    margin: .5rem 0 1rem;
    font-size: 1.4rem;
    color: #111;
}

.crumbs {
    color: #6b7280;
    font-size: .92rem;
    margin: .25rem 0 .75rem;
}

.crumbs a {
    color: #374151;
}

.crumbs span {
    margin: 0 .3rem;
}

/* grille 2 colonnes (stack sur mobile) */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

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

/* Checkout : contrôles de quantité */
.checkout-page .qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 6px;
}

.checkout-page .qty button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--blue-color);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.checkout-page .qty span {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
}

.checkout-page .remove-line {
    display: inline-block;
    margin-top: 6px;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.checkout-page .remove-line:hover {
    color: #ef4444;
}

/* carte (résumé) */
.c-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.c-card__title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 800;
}

/* totaux */
.c-totals {
    margin: 0;
}

.c-totals .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.c-totals .row:last-child {
    border-bottom: 0;
}

.c-totals .row.muted {
    color: #6b7280;
    font-size: .9rem;
}

.c-totals .row.total {
    padding-top: 10px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
    display: inline-block;
    text-align: center;
}

.tiny-note {
    margin-top: 10px;
    color: #6b7280;
    font-size: .85rem;
}

/* liste d’articles */
.c-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.c-item {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 520px) {
    .c-item {
        grid-template-columns: 88px 1fr;
    }

    .c-item .amount {
        grid-column: 1 / -1;
        text-align: right;
    }
}

.c-thumb {
    width: 112px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f7fb;
    border: 1px solid #edf0f5;
}

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

.c-info .name {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--blue-color);
    line-height: 1.2;
}

.c-info .meta {
    color: #6b7280;
    font-size: .92rem;
}

.c-info .meta .dot {
    margin: 0 .35rem;
    color: #c9ced6;
}

.amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

/* désactive le bouton si panier vide */
#pay-button[disabled] {
    opacity: .6;
    cursor: not-allowed;
}


/* ======================================================
   9) Boutique / produits
   ====================================================== */

.product-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#products-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    background: none;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #f5f7fb;
    overflow: hidden;
}

.product-card .view-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.product-card .view-btn:focus {
    outline: none;
}

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

.product-card__title {
    display: inline-block;
    margin: 12px 14px 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-color);
    text-decoration: none;
}

.product-card__title:hover {
    text-decoration: underline;
}

.product-card__desc {
    margin: 0 14px 10px;
    font-size: .92rem;
    line-height: 1.45;
    color: #6b7280;
    text-align: left;
    hyphens: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px 14px;
}

.product-card__price {
    font-weight: 800;
    color: var(--blue-color);
}

.product-card .view-link {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--blue-color);
    text-decoration: none;
    font-weight: 600;
}

.product-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-card .add-to-cart-btn {
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--blue-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.product-card .add-to-cart-btn:hover {
    background: #000;
}

/* Overlay compact (desktop) */
@media (hover:hover) and (pointer:fine) {
    .product-card__actions {
        position: absolute;
        right: 12px;
        bottom: 12px;
        left: auto;
        padding: 0;
        background: transparent;
        border: 0;
        opacity: 0;
        transform: translateY(4px);
        transition: opacity .18s ease, transform .18s ease;
    }

    .product-card:hover .product-card__actions {
        opacity: 1;
        transform: translateY(0);
    }

    .product-card .add-to-cart-btn {
        padding: 10px 12px;
        border-radius: 999px;
        background: rgba(17, 24, 39, .92);
        color: #fff;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    }

    .product-card__actions .view-link {
        display: none;
    }
}

/* Mobile : actions sous l’image */
@media (hover:none),
(pointer:coarse) {
    .product-card__actions {
        position: static;
        background: transparent;
        border: 0;
        padding: 10px 14px 0;
        opacity: 1;
        transform: none;
    }

    .product-card .add-to-cart-btn {
        border-radius: 10px;
        background: var(--blue-color);
    }
}

/* Filtres boutique */
.filters {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

#search {
    width: 100%;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 14px;
    font-size: .95rem;
    background: #fff;
}

#sort {
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    font-size: .95rem;
}

/* ======================================================
   9,5) Portfolio
   ====================================================== */
#portfolio-list {
    /* Grille responsive, similaire à la liste de produits */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: var(--page-gap);
    max-width: 1200px;
    margin: 0 auto 50px auto;
    list-style: none;
    /* S'assure qu'il n'y a pas de puces */
}

/* Style de la carte individuelle */
.portfolio-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    /* Important pour les coins arrondis de l'image */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    /* Effet de survol subtil */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-link-wrapper {
    text-decoration: none;
    /* Supprime le soulignement par défaut */
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* S'assure que toute la carte est un lien visuel */
}

.card-image-ct {
    height: 75%;
    /* Hauteur fixe pour toutes les images */
    overflow: hidden;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Recadre l'image pour remplir l'espace sans la déformer */
    transition: transform 0.3s;
}

.portfolio-card:hover img {
    transform: scale(1.05);
    /* Zoom subtil au survol */
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Permet au contenu de remplir l'espace restant */
}

.portfolio-card h3 {
    font-size: 1.25em;
    color: var(--blue-color);
    margin: 0 0 8px 0;
}

.portfolio-card p {
    color: #555;
    font-size: 0.9em;
    flex-grow: 1;
    /* Pousse le bouton vers le bas */
}

.portfolio-card .btn-secondary {
    display: inline-block;
    margin-top: 15px;
    text-align: center;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: #fff;
    transition: background 0.2s, color 0.2s;
}

.portfolio-card:hover .btn-secondary {
    background: var(--accent);
    color: #fff;
}

/* ======================================================
   10) Panier (popup)
   ====================================================== */
/* === Cart dropdown (header) – relooking === */
.site-nav .right,
.second-header .right {
    position: relative;
}

/* conteneur */
.cart-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 360px;
    max-width: 86vw;
    display: none;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    z-index: 10000;
    transform: translateY(-6px);
    opacity: 0;
    transition: .18s ease;
}

.cart-popup.active {
    display: block;
    transform: none;
    opacity: 1;
}

/* petit “triangle” sous le bouton */
.cart-popup::before {
    content: "";
    position: absolute;
    right: 28px;
    top: -8px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

/* liste scrollable */
#cart-container {
    max-height: 56vh;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* item */
.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 10px;
}


.cart-item img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f7fb;
    border: 1px solid #edf0f5;
}

.cart-item h3 {
    margin: 0 0 4px;
    font-size: .95rem;
    line-height: 1.2;
    color: var(--blue-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item .ci-meta {
    margin: 0 0 6px;
    color: #6b7280;
    font-size: .9rem;
}

/* remets à zéro le style global des petites actions */
.cart-popup .update,
.cart-popup .remove {
    appearance: none;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* quantité */
.cart-item .ci-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
}

.cart-item .ci-qty .update {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--blue-color);
    color: #fff;
    line-height: 1;
    font-size: 18px;
}

.cart-item .ci-qty .qv {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
}

/* colonne de droite */
.cart-item .ci-right {
    text-align: right;
    white-space: nowrap;
}

.cart-item .ci-line {
    font-weight: 700;
}

.cart-item .remove {
    display: inline-block;
    margin-top: 6px;
    color: #6b7280;
}

.cart-item .remove:hover {
    color: #ef4444;
}

/* footer “sticky” dans la popup */
.cart-total {
    position: sticky;
    bottom: -1px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 12px;
}

.cart-total .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-total .btn-primary {
    width: 100%;
}


/* ======================================================
   11) Admin
   ====================================================== */

/* Admin: conteneur centré, “décollé” des bords */
.admin-page {
    max-width: 1100px;
    /* même esprit que le reste du site */
    margin: 1.5rem auto 2rem;
    /* centre la page */
    padding: 0 16px;
    /* décollage gauche/droite */
}

/* Barre recherche + tri sur une ligne avec espace */
.admin-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

/* Petites marges cohérentes pour les sections */
.admin-page h2 {
    margin: .75rem 0 .5rem;
}

.admin-page form {
    margin: .5rem 0 1.25rem;
}

#images-ct .img-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

#images-ct .img-row input {
    flex: 1;
}

#images-ct .img-row img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

#images-ct .img-row .drag {
    cursor: grab;
}

/* ======================================================
   ADMIN SECTIONS (Styles pour les formulaires et listes d'administration)
   ====================================================== */

.admin-section {
    padding-top: 20px;
    margin-bottom: 40px;
    /* Espace après chaque section admin */
}

.admin-title,
.list-title,
.form-title {
    margin-top: 30px;
    margin-bottom: 15px;
}

.admin-form {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.admin-form input[type="text"],
.admin-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Grille pour les listes (réutilisation de la structure des produits) */
.admin-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Style des cartes individuelles dans les listes admin */
.admin-product {
    background: #fff;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* Média | Edit | Delete */
    gap: 10px;
    align-items: center;
}

/* Gestion de l'éditeur d'images */
.image-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.img-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid #f3f4f6;
    border-radius: 4px;
}

.img-row .img-url {
    flex-grow: 1;
    /* Petit padding spécifique pour les input dans la ligne */
    padding: 8px;
}

.img-row button.rm-img {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
}

.add-row-btn {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.empty-state {
    padding: 20px;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    grid-column: 1 / -1;
    /* Prend toute la largeur de la grille */
    text-align: center;
    color: #6b7280;
}

.calculateur-prix {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 1rem;
    gap: 1.5rem;
}

/* ======================================================
   12) OrderPage
   ====================================================== */
.orders-page .o-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* carte : on réutilise .c-card pour la DA ; on ajuste l’entête */
.o-card .o-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.o-id {
    font-weight: 700;
    color: var(--blue-color);
    font-size: 1.02rem;
}

.o-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    color: #6b7280;
    font-size: .95rem;
    margin-bottom: 6px;
}

.o-total strong {
    color: var(--blue-color);
}

/* rangée de miniatures (donne de la couleur même fermé) */
.o-previews {
    display: flex;
    gap: 6px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}

.o-previews img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f5f7fb;
}

/* détails produit (accordéon) */
.o-details {
    margin-top: 8px;
}

.o-details>summary {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    color: var(--blue-color);
    user-select: none;
}

.o-details>summary::-webkit-details-marker {
    display: none;
}

.o-details>summary::after {
    content: "›";
    float: right;
    color: #9ca3af;
    transition: transform .2s;
}

.o-details[open]>summary::after {
    transform: rotate(90deg);
}

/* badges statut */
/* ===== Order chips (status) ===== */
.o-status {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .92rem;
    line-height: 1;
    border: 1px solid currentColor;
    background: #fff;
    color: var(--blue-color);
}

/* Attente (avant prod) — orange doux */
.status-pending {
    color: #c2410c;
    /* texte/bordure */
    background: #fff7ed;
    /* fond */
    border-color: #fdba74;
}

/* Attente de paiement — amber */
.status-payment {
    color: #92400e;
    background: #fffbeb;
    border-color: #fcd34d;
}

/* Production / création — bleu */
.status-build {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}

/* Livraison / expédié — indigo */
.status-delivery {
    color: #3730a3;
    background: #eef2ff;
    border-color: #a5b4fc;
}

/* Terminé — vert */
.status-done {
    color: #166534;
    background: #ecfdf5;
    border-color: #86efac;
}

/* Annulé — gris */
.status-cancelled {
    color: #374151;
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* liste détaillée : on réutilise .c-list/.c-item du checkout */
.o-items {
    margin-top: 8px;
}

/* ======================================================
   13) Footer
   ====================================================== */
footer {
    padding: 20px;
    background: #d3d3d3;
    margin-top: 20px;
}

.a-connection {
    display: flex;
    justify-content: center;
}

footer input {
    width: 30vw;
    font-size: small;
    height: 10px;
    margin: auto;
}

/* ======================================================
   14) Page produit
   ====================================================== */

/* Conteneur de la fiche */
main.product-page {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* Fil d’Ariane */
.product-page .crumbs {
    font-size: .9rem;
    color: #6b7280;
    display: flex;
    gap: .5rem;
    align-items: center;
}

.product-page .crumbs a {
    color: #374151;
}

.product-page .crumbs span {
    color: #9ca3af;
}

/* Grille : galerie à gauche, infos à droite */
.product-page .product-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: start;
}

/* ======================================================
   15) Page Creation
   ====================================================== */

.creation-grid {
    display: flex;
    gap: var(--page-gap);
    max-width: 1200px;
    margin: var(--page-gap) auto;
    padding: 0 var(--page-gap);
    /* Ajout de padding si nécessaire */
}

/* Changement en colonne sur mobile */
@media (max-width: 900px) {
    .creation-grid {
        flex-direction: column;
    }
}

.creation-gallery {
    flex: 1;
    /* Prend la moitié de l'espace */
    padding: 0;
}

.c-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.c-gallery__main {
    width: 100%;
    height: auto;
    max-height: 400px;
    /* Limite la hauteur de l'image principale */
    object-fit: contain;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: #f7f7f7;
    /* Fond clair pour les images transparentes */
}

.c-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* Permet le défilement horizontal des vignettes */
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.c-thumb {
    flex-shrink: 0;
    /* Empêche les vignettes de rétrécir */
    width: 80px;
    height: 80px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s;
}

.c-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.c-thumb.is-active {
    border-color: var(--accent);
    /* Met en évidence l'image active */
    border-width: 2px;
}

.creation-info {
    flex: 1;
    /* Prend la moitié de l'espace */
    padding: 10px;
}

.creation-info h1 {
    margin-top: 0;
    font-size: 2em;
    color: var(--blue-color);
}

.creation-info h2 {
    margin-top: 25px;
    font-size: 1.5em;
    color: var(--blue-color);
}

.call-to-action {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: #fcfcfc;
}

/* =======================
   Galerie
   ======================= */
.product-page .p-gallery {
    width: 100%;
}

.product-page .p-gallery__main {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    background: #f5f7fb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 6px;
    object-fit: contain;
    /* pas de recadrage moche */
}

/* Thumbnails sous l’image principale */
.product-page .p-thumbs {
    margin-top: 10px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 6px;
}

.product-page .p-thumb {
    display: block;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.product-page .p-thumb img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: block;
}

.product-page .p-thumb.is-active {
    border-color: #2563eb;
}

/* =======================
   Panneau d’infos
   ======================= */
.product-page .p-info {
    color: var(--blue-color);
}

.product-page .p-title {
    margin: 0 0 .25rem;
    font-size: 1.6rem;
    font-weight: 800;
}

.product-page .p-desc {
    margin: .25rem 0 1rem;
    color: #4b5563;
    line-height: 1.5;
}

.product-page .p-price {
    font-size: 1.4rem;
    font-weight: 800;
    margin: .2rem 0 1rem;
}

/* Quantité + boutons +/- */
.product-page .qty-row {
    margin: .5rem 0 1rem;
}

.product-page .qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
}

.product-page .qty button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--blue-color);
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.product-page .qty input {
    width: 72px;
    height: 36px;
    text-align: center;
    border: 0;
    background: transparent;
    font-size: 16px;
    outline: none;
}

/* CTA */
.product-page .cta-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.product-page .btn-primary {
    padding: .75rem 1.1rem;
    border: 0;
    border-radius: 10px;
    background: var(--blue-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.product-page .btn-primary:hover {
    background: #000;
}

.product-page .btn-light {
    display: inline-block;
    padding: .7rem 1rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--blue-color);
    text-decoration: none;
    font-weight: 600;
}

/* Accordéon description détaillée */
.product-page .p-acc {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .8rem 1rem;
    background: #fff;
}

.product-page .p-acc>summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
}

.product-page .p-acc>summary::-webkit-details-marker {
    display: none;
}

.product-page .p-acc>summary::after {
    content: "›";
    float: right;
    transition: transform .2s;
    color: #9ca3af;
}

.product-page .p-acc[open]>summary::after {
    transform: rotate(90deg);
}

/* =======================
   Responsive
   ======================= */
@media (max-width: 960px) {
    .product-page .product-details {
        grid-template-columns: 1fr;
    }

    .product-page .p-gallery__main {
        aspect-ratio: 4 / 3;
        max-height: 70vh;
    }
}

@media (min-width: 1200px) {
    :root {
        --page-gap: 22px;
    }
}

/* ======================================================
   15) Checkout — layout + cartes + liste — REMPLACEMENT COMPLET
   ====================================================== */
.checkout-page {
    max-width: 1100px;
    margin: 1.5rem auto 2rem;
    padding: 0 1rem;
}

.checkout-title {
    margin: .5rem 0 1rem;
    font-size: 1.4rem;
    color: #111;
}

.crumbs {
    color: #6b7280;
    font-size: .92rem;
    margin: .25rem 0 .75rem;
}

.crumbs a {
    color: #374151;
}

.crumbs span {
    margin: 0 .3rem;
}

/* grille 2 colonnes (stack sur mobile) */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

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

/* Checkout : contrôles de quantité */
.checkout-page .qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 6px;
}

.checkout-page .qty button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--blue-color);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.checkout-page .qty span {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
}

.checkout-page .remove-line {
    display: inline-block;
    margin-top: 6px;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.checkout-page .remove-line:hover {
    color: #ef4444;
}

/* carte (résumé) */
.c-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.c-card__title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 800;
}

/* totaux */
.c-totals {
    margin: 0;
}

.c-totals .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.c-totals .row:last-child {
    border-bottom: 0;
}

.c-totals .row.muted {
    color: #6b7280;
    font-size: .9rem;
}

.c-totals .row.total {
    padding-top: 10px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
    display: inline-block;
    text-align: center;
}

.tiny-note {
    margin-top: 10px;
    color: #6b7280;
    font-size: .85rem;
}

/* liste d’articles */
.c-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.c-item {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 520px) {
    .c-item {
        grid-template-columns: 88px 1fr;
    }

    .c-item .amount {
        grid-column: 1 / -1;
        text-align: right;
    }
}

.c-thumb {
    width: 112px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f7fb;
    border: 1px solid #edf0f5;
}

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

.c-info .name {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--blue-color);
    line-height: 1.2;
}

.c-info .meta {
    color: #6b7280;
    font-size: .92rem;
}

.c-info .meta .dot {
    margin: 0 .35rem;
    color: #c9ced6;
}

.amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

/* désactive le bouton si panier vide */
#pay-button[disabled] {
    opacity: .6;
    cursor: not-allowed;
}