@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Alex+Brush&display=swap');

/* ============================
   Variables de base (palette)
   ============================ */
:root {
    /* Couleurs de base */
    --color-primary: #143BF6;        /* bleu AtelierProBats (logo) */
    --color-primary-dark: #0f2ec6;   /* bleu foncé (survols, dégradés) */
    --color-text: #1F2933;           /* texte principal */
    --color-muted: #080805;          /* texte secondaire (fond bleu du site) */
    --color-border: #E5E7EB;         /* bordures, séparateurs */
    --color-card-bg: #f4f8ff;        /* fond des cartes/blocs (bleu très clair) */
    --color-accent: #f4bb05;         /* accent chaud jaune (rappel du logo) */
    --color-classactive: #143BF6;    /* lien de menu actif/survolé (bleu marque) */

    --radius-lg: 12px;
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.16);
    --max-width: 1800px;
}

/* ============================
   Reset simple
   ============================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================
   Fond général + texte
   ============================ */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* Fond = image + voile blanc semi-transparent par-dessus */
    background:
        linear-gradient(
            rgba(245, 255, 255, 0.82),
            rgba(255, 255, 255, 0.82)
        ),
        url("images/texture-bois-chene.jpg") center / cover no-repeat;
    color: var(--color-text);
    line-height: 1.6;
}

/* ============================
   Titres
   ============================ */
h1, h2, h3 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
}

h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-primary);  /* Couleur de la police pour h1 */
}

h2 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-muted);
    font-size: 2.4rem;
    font-weight: 600;
}

h3 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-accent);
    font-size: 1.8rem;
    font-weight: 600;
}
h4 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-muted);
    font-size: 1.8rem;
    font-weight: 600;
}

h5 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-muted);
    font-size: 1.4rem;
    font-weight: 400;
}

/* Espacement supplémentaire entre les parties de la page À propos */
.apropos-subtitle {
    margin-top: 2.5rem;   /* augmente si tu veux encore plus d'espace (ex : 3rem) */
}

/* Texte secondaire / intro */
.section-intro,
.advantage p,
.footer {
    color: var(--color-muted);
}

/* ============================
   Layout général
   ============================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
    /* bande claire légèrement transparente pour voir un peu l'image */
    background: #f4bb0510;
}

.section-alt {
    /* même chose, tu peux varier légèrement si tu veux */
    background: #143BF610;
}

.section h2 {
    margin-bottom: 1rem;
}

.section-intro {
    margin-bottom: 2rem;
}

/* ============================
   Header + navigation
   ============================ */
.header {
    position: sticky;
    top: 0;
    z-index: 20;

    /* Image en fond du header */
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.1)
        ),
        url("images/texture-bois-chene.jpg") center / cover no-repeat;

    border-bottom: 1px solid var(--color-border);
}


.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* on aligne tout à gauche */
    gap: 0.8rem;                   /* espace logo / textes plus petit */
    padding: 0.4rem 0.8rem;
}


.header-logo img {
    display: block;
    max-height: 72px;      /* ajuste la taille du logo sur PC ici */
    height: auto;
    width: auto;
}

/* Droite: titre + menu */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* texte + menu alignés à gauche */
    gap: 0.3rem;
}

/* Titre "AtelierProBats" à droite du logo - style logo Poppins */
.site-title {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 3.4rem;           /* augmente à 3.6 / 3.8 si tu veux plus gros */
    font-weight: 800;            /* gros gras bien net */
    text-transform: uppercase;   /* BATS MÉCANÉLEC */
    letter-spacing: 0.18em;      /* espacement façon logo */
    color: #143BF6;
    line-height: 1;
    text-shadow: none;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Liens de navigation */
.nav a {
    text-decoration: none;
    font-size: 1.6rem;   /* taille des liens de navigation */
    font-weight: 700;
    color: #000000;
    
    transition: color 0.2s ease;
    padding:0.15rem 0;
}

/* Nav dans le header */
.header .nav a {
    color: var(--color-primary-dark);
}


.header .nav a.active {
    color: var(--color-classactive);
    font-weight: 600;
}

.header .nav a:hover {
    color: var(--color-classactive);
}

/* ============================
   Lien réseaux sociaux
   ============================ */

.social-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 1rem;
}

.social-links img {
    height: 48px;         /* on fixe seulement la hauteur */
    width: auto;          /* la largeur s'adapte, plus de déformation */
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    transition: transform 0.15s ease, opacity 0.15s ease;
    object-fit: contain;  /* au cas où, on demande de respecter les proportions */
}

.social-links a:hover img {
    transform: translateY(-1px) scale(1.05);
    opacity: 0.85;
}

/* ============================
   Hero (bloc d'accueil haut)
   ============================ */
.hero {
    padding: 5rem 0 4rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.hero p {
    max-width: 600px;
    color: var(--color-muted);
}

/* ============================
   Boutons
   ============================ */
.btn-primary,
.btn-secondary {
    display: inline-block;
    border-radius: 999px;
    padding: 0.7rem 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
}

/* Bouton principal */
.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* Bouton secondaire */
.btn-secondary {
    background-color: #ffffff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* ============================
   Produits (boutique)
   ============================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.75rem;
    font-size: 1rem;
}

.product-card {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.boutique-vertical-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.boutique-vertical-list .product-card {
    padding: 1.1rem;
    gap: 0.8rem;
}

.boutique-vertical-list .product-card h2 {
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 0;
}

.boutique-panel-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.boutique-panel-photos img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

.boutique-vertical-list .btn-primary {
    align-self: flex-start;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Placeholder si pas d'image */
.placeholder-image {
    background: repeating-linear-gradient(
        45deg,
        #e5e7eb,
        #e5e7eb 10px,
        #f3f4f6 10px,
        #f3f4f6 20px
    );
    color: var(--color-muted);
    font-size: 0.9rem;
}

.product-card h3 {
    font-size: 1.1rem;
}

/* Deux boutons sous l'image dans les cartes produit */
/* Deux boutons sous l'image dans les cartes produit */
.product-actions {
    display: flex;
    flex-wrap: wrap;        /* autorise le retour à la ligne */
    gap: 0.6rem;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

/* Boutons dans la carte produit */
.product-actions .btn-secondary {
    flex: 1 1 150px;        /* prend la place dispo, mais peut se réduire */
    max-width: 100%;        /* ne dépasse jamais la largeur de la carte */
    text-align: center;
    box-sizing: border-box;
}


.product-actions .btn-secondary {
    flex: 1;              /* les deux boutons prennent la même largeur */
    text-align: center;
}

.product-price {
    font-weight: 600;
}

.product-desc {
    color: var(--color-muted);
    font-size: 0.9rem;
    flex-grow: 1;
}

@media (max-width: 860px) {
    .boutique-vertical-list {
        grid-template-columns: 1fr;
    }
}

/* ============================
   Avantages (3 cartes)
   ============================ */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.advantage {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.advantage h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

/* ============================
   Services + photos associées
   ============================ */

.services-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-item h4 {
    margin-bottom: 0.6rem;
}

/* Ligne de 3 petites vignettes centrées, cadres moins larges */
.service-photos {
    display: flex;
    flex-wrap: wrap;       /* sur petit écran, les vignettes passent à la ligne */
    gap: 0.5rem;
    justify-content: flex-start;
}

.service-photos img {
    width: 350px;          /* largeur fixe du cadre */
    max-width: 100%;       /* mais jamais plus large que l'écran */
    height: 230px;          /* hauteur fixe */
    object-fit: contain;   /* affiche toute la photo sans la couper */
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    background-color: #ffffff;
}

/* ============================
   Formulaire de contact
   ============================ */
.contact-form {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

input,
textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

/* ============================
   Footer
   ============================ */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1.5rem 0;
    background: transparent;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    text-align: center;
}

.footer-links a {
    text-decoration: none;
    color: var(--color-muted);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* ============================
   ADAPTATION MOBILE
   ============================ */
@media (max-width: 768px) {

    .header-content {
        padding: 0.2rem 0.4rem 0.4rem;  /* un peu de marge à gauche/droite */
        gap: 0.1rem;
    }

    /* Logo plus petit + bien centré sur mobile */
    .logo {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 2.2rem;  /* texte "AtelierProBats" plus petit */
        gap: 0.2rem;
    }


    .logo img {
        max-height: 80px;       /* réduit le logo sur mobile */
        max-width: 90vw;        /* ne dépasse jamais la largeur de l'écran */
    }
    
    .site-title {
        font-size: 2.2rem;
        letter-spacing: 0.12em;
        text-align: center;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
        margin-top: 0.1rem;
    }

    .nav a {
        font-size: 0.95rem;
    }

    .social-links {
        margin-left: 0;
        margin-top: 0.2rem;
        gap: 0.4rem;
    }

    .social-links img {
        width: 18px;
        height: 28px;
    }

}

/* ============================
   HEADER UNIFIE - OVERRIDE
   ============================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
        url("images/texture-bois-chene.jpg") center / cover no-repeat;
    border-bottom: 2px solid #d2691e;
}

.header .header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.35rem 0.9rem;
}

/* Logo prominent a gauche (~90% de la hauteur du header) */
.header .header-logo { flex: 0 0 auto; display: flex; align-items: center; }
.header .header-logo img {
    height: 132px;
    max-height: 132px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Bloc marque + menu : titre et sous-titre cote a cote (rangee 1), menu dessous (rangee 2) */
.header .header-right {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: max-content max-content 1fr;
    grid-template-areas:
        "title subtitle ."
        "nav   nav      nav";
    align-items: center;
    column-gap: 0.85rem;
    row-gap: 0.3rem;
}

.header .site-title {
    grid-area: title;
    display: inline-block;
    height: clamp(3.6rem, 7vw, 6rem);
    width: clamp(16rem, 31vw, 27rem);
    background: url("images/index/titre-atelierprobats.png") left center / contain no-repeat;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
}

.header .site-subtitle {
    grid-area: subtitle;
    align-self: center;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    white-space: nowrap;
    padding-left: 0.85rem;
    border-left: 2px solid #e2e6ec;
}

.header .nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
}

.header .nav a {
    text-decoration: none;
    font-size: 1.55rem;
    font-weight: 700;
    color: #143BF6;
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

/* Compte + panier separes du menu principal (ecart raisonnable) */
.header .nav a[href="mon-compte.php"] { margin-left: 2.4rem; }

.header .nav a.active { color: #ffffff; background: #d2691e; }
.header .nav a:hover { color: #d2691e; background: rgba(210, 105, 30, 0.12); }

.header .header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.header .header-cta {
    box-shadow: 0 8px 18px rgba(210, 105, 30, 0.28);
    background: #d2691e;
    color: #fff;
    display: none !important;
}

.header .header-cta:hover {
    background: #b45309;
}

.header .social-links {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0;
}

.header .social-links img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

@media (max-width: 768px) {
    .header .header-content {
        display: grid;
        grid-template-columns: 18px 1fr;
        align-items: center;
        justify-content: stretch;
        padding: 0.7rem 0;
        gap: 0.7rem;
        min-height: 0;
    }

    .header .header-logo {
        grid-row: 1;
        grid-column: 1;
        align-self: center;
        justify-self: start;
    }

    .header .header-right {
        grid-row: 1;
        grid-column: 2;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .header .header-logo img {
        height: auto;
        max-height: 17px;
        min-height: 0;
    }

    .header .site-title {
        font-size: clamp(1.3rem, 5.3vw, 1.7rem);
        letter-spacing: 0.02em;
    }

    .header .site-subtitle {
        font-size: 0.74rem;
        text-align: center;
    }

    .header .nav {
        grid-column: 1 / span 2;
        justify-content: center;
        gap: 0.35rem;
    }

    .header .nav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.55rem;
    }

    .header .header-actions {
        grid-column: 1 / span 2;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .header .social-links img {
        width: 28px;
        height: 28px;
    }

    /* Titre (image à largeur fixe) et sous-titre (nowrap) débordaient côte à côte :
       on les empile et on les laisse se réduire à la largeur de l'écran. */
    .header .header-right {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "subtitle"
            "nav";
    }

    .header .site-title {
        width: min(100%, 20rem);
        height: 3rem;
        background-position: center;
        justify-self: center;
    }

    .header .site-subtitle {
        white-space: normal;
        border-left: none;
        padding-left: 0;
        justify-self: center;
    }

    .header .nav a {
        padding: 0.4rem 0.6rem;   /* cible tactile plus confortable */
    }
}





/* ============================
   Theme toggle + mode sombre
   ============================ */
/* Bouton bascule thème clair/sombre placé sous le logo (pages publiques). */
.header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.header-logo .header-theme-toggle {
    align-self: center;
    width: max-content;
    font-size: 0.72rem;
    padding: 0.18rem 0.7rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}
html[data-theme="dark"] .header-logo .header-theme-toggle {
    background: #0f172a;
    color: #e5e7eb;
    border-color: #d2691e;
}

/* === Lisibilité du thème CLAIR sur le fond bleu du site public ===
   Le fond (fond_general_site.png) est bleu même en thème clair : le texte de
   section doit donc être clair. On ne cible que le texte posé DIRECTEMENT sur le
   bleu (enfants directs de .container, héros, .service-item). Les cartes blanches
   (.advantage, .product-card, .legal-card, .boutique-account-card…) imbriquent
   leur texte plus profondément → non ciblées → elles gardent leur texte foncé.
   Scope public : body sans classe "page-*" (exclut l'intranet). */
html[data-theme="light"] body:not([class*="page-"]) .hero h1,
html[data-theme="light"] body:not([class*="page-"]) .hero h2,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > h1,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > h2,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > h3,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > h4,
html[data-theme="light"] body:not([class*="page-"]) .service-item h4 {
    color: #f8fafc;
}
html[data-theme="light"] body:not([class*="page-"]) .hero p,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > h5,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > p,
html[data-theme="light"] body:not([class*="page-"]) .section > .container > .section-intro,
html[data-theme="light"] body:not([class*="page-"]) .service-item h5 {
    color: #e8edf5;
}

.theme-toggle-btn {
    border: 1px solid #d2691e;
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.32rem 0.75rem;
    cursor: pointer;
    align-self: flex-end;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background: #d2691e;
    color: #ffffff;
    transform: translateY(-1px);
}

html[data-theme="dark"] body {
    background:
        linear-gradient(
            rgba(5, 8, 15, 0.9),
            rgba(5, 8, 15, 0.94)
        ),
        url("images/texture-bois-chene.jpg") center / cover no-repeat;
    color: #e5e7eb;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5 {
    color: #e5e7eb;
}

html[data-theme="dark"] .section {
    background: rgba(20, 59, 246, 0.12);
}

html[data-theme="dark"] .section-alt {
    background: rgba(244, 187, 5, 0.08);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .advantage {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .product-desc,
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .advantage p,
html[data-theme="dark"] label,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer-links a {
    color: #cbd5e1;
}

/* Harmonisation : messages de statut (texte simple) lisibles en mode sombre.
   En clair ils restent rouge/vert foncés (#b91c1c / #166534) ; en sombre ces
   couleurs tombent à ~2:1, on les repasse en variantes claires.
   Les BADGES (fond clair #fee2e2/#dcfce7) ne sont pas concernés. */
html[data-theme="dark"] .annuaire-missing-number,
html[data-theme="dark"] .ac-mt045-err,
html[data-theme="dark"] .cu-error,
html[data-theme="dark"] .intra-error-login,
html[data-theme="dark"] .intra-error,
html[data-theme="dark"] .req-msg-error,
html[data-theme="dark"] .req-open-count-value,
html[data-theme="dark"] .mp-error,
html[data-theme="dark"] .nf-batch-cross.is-err,
html[data-theme="dark"] .nf-batch-auto-note {
    color: #f87171 !important;
}
html[data-theme="dark"] .ac-mt045-ok,
html[data-theme="dark"] .cu-success,
html[data-theme="dark"] .intra-success,
html[data-theme="dark"] .req-msg-success,
html[data-theme="dark"] .mp-success,
html[data-theme="dark"] .nf-batch-cross.is-ok {
    color: #6ee7b7 !important;
}

html[data-theme="dark"] .btn-secondary {
    background-color: #0f172a;
    color: #bfdbfe;
    border-color: #3b82f6;
}

html[data-theme="dark"] .btn-secondary:hover {
    background-color: #1d4ed8;
    color: #ffffff;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #475569;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.4);
}

html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .theme-toggle-btn {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #60a5fa;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
}

@media (max-width: 768px) {
    .theme-toggle-btn {
        margin-left: auto;
    }
}



/* === 2026-02-28: Fond global site (fond_general_site) === */
body {
    background: url("images/index/fond_general_site.png") center center / cover no-repeat !important;
}
/* === 2026-02-28: Bouton image Modifier (global) === */
.btn-modifier-image {
    display: inline-block;
    width: 168px;
    min-width: 168px;
    height: 50px;
    min-height: 50px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent url("images/index/bouton_modifier.png") center center / 100% 100% no-repeat !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: none !important;
    vertical-align: middle;
}

.btn-modifier-image:hover,
.btn-modifier-image:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-modifier-image.btn-mini {
    width: 132px;
    min-width: 132px;
    height: 40px;
    min-height: 40px;
}

@media (max-width: 640px) {
    .btn-modifier-image {
        width: 150px;
        min-width: 150px;
        height: 46px;
        min-height: 46px;
    }

    .btn-modifier-image.btn-mini {
        width: 122px;
        min-width: 122px;
        height: 38px;
        min-height: 38px;
    }
}
/* === 2026-02-28: Skin image automatique boutons (bouton_*) === */
.btn-image-skin,
.btn-modifier-image {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    height: 50px;
    min-height: 50px;
    min-width: 190px;
    width: 190px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent var(--btn-image-url, url("images/index/bouton_modifier.png")) center center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px;
    white-space: nowrap;
    overflow: hidden;
}

.btn-image-skin.btn-image-size-sm { width: 190px; min-width: 190px; }
.btn-image-skin.btn-image-size-md { width: 245px; min-width: 245px; }
.btn-image-skin.btn-image-size-lg { width: 320px; min-width: 320px; }
.btn-image-skin.btn-image-size-xl { width: 390px; min-width: 390px; }

.btn-image-skin:hover,
.btn-image-skin:focus-visible,
.btn-modifier-image:hover,
.btn-modifier-image:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .btn-image-skin,
    .btn-modifier-image {
        height: 44px;
        min-height: 44px;
        width: 170px;
        min-width: 170px;
    }

    .btn-image-skin.btn-image-size-sm { width: 170px; min-width: 170px; }
    .btn-image-skin.btn-image-size-md { width: 212px; min-width: 212px; }
    .btn-image-skin.btn-image-size-lg { width: 265px; min-width: 265px; }
    .btn-image-skin.btn-image-size-xl { width: 320px; min-width: 320px; }
}
/* === 2026-05-14: le theme ne doit pas modifier le header === */
html[data-theme="dark"] .header {
    border-bottom: 1px solid var(--color-border) !important;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.1)
        ),
        url("images/texture-bois-chene.jpg") center / cover no-repeat !important;
}

html[data-theme="dark"] .header .site-title {
    color: #143BF6 !important;
}

html[data-theme="dark"] .header .site-subtitle {
    color: #1F2933 !important;
}

html[data-theme="dark"] .header .nav a {
    color: var(--color-primary-dark) !important;
    background: transparent !important;
}

html[data-theme="dark"] .header .nav a.active,
html[data-theme="dark"] .header .nav a:hover {
    color: var(--color-classactive) !important;
    background: transparent !important;
}

html[data-theme="dark"] .header-logo img,
html[data-theme="dark"] .header .social-links img {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)) !important;
    opacity: 1 !important;
}

/* ===== Boutique publique ===== */
.boutique-toolbar {
  padding-top: 1.4rem;
  padding-bottom: .4rem;
}
.boutique-results {
  padding-top: .6rem;
}
.boutique-search {
  margin-top: 1rem;
}
.boutique-search input {
  width: 100%;
  max-width: 520px;
  padding: 12px 18px;
  border: 1px solid #cfd4dc;
  border-radius: 999px;
  font: inherit;
  background: #fff;
}
.boutique-search input:focus {
  outline: none;
  border-color: #1a3c6e;
  box-shadow: 0 0 0 3px rgba(26, 60, 110, .15);
}
.boutique-no-result {
  font-style: italic;
  color: #6b7280;
}
.products-grid .product-card[hidden] {
  display: none !important;
}
.boutique-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}
.boutique-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: .7rem;
  padding-left: 2px;
}
.boutique-subcategories .btn-secondary {
  font-size: .85rem;
  padding: 6px 13px;
}
.boutique-subcategories .btn-secondary.active {
  background: #1a3c6e;
  color: #fff;
  border-color: #1a3c6e;
}
.boutique-categories .btn-secondary.active {
  background: #1a3c6e;
  color: #fff;
  border-color: #1a3c6e;
}
/* Barre des catégories en bas du header — façon barres de navigation intranet */
.boutique-catbar {
  border-top: 1px solid rgba(28, 57, 120, 0.18);
  background: rgba(230, 238, 252, 0.92);
}
.boutique-catbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.8rem;
}
.boutique-catbar .btn-secondary {
  font-size: 0.9rem;
  padding: 6px 14px;
}
.boutique-catbar .btn-secondary.active {
  background: #1a3c6e;
  color: #fff;
  border-color: #1a3c6e;
}
html[data-theme="dark"] .boutique-catbar {
  background: rgba(15, 23, 42, 0.92);
  border-top-color: rgba(148, 163, 184, 0.25);
}
.boutique-cat-title {
  margin: 0 0 1rem;
}
.product-card .product-image {
  display: block;
}
.product-image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #f0f2f5, #f0f2f5 12px, #e7eaef 12px, #e7eaef 24px);
  border-radius: 8px;
}
.product-card h3 a {
  color: inherit;
  text-decoration: none;
}
.product-card h3 a:hover {
  text-decoration: underline;
}

/* Boutique : cartes a taille fixe (evite l'etirement quand peu de produits) */
.boutique-results .products-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
  justify-content: start;
  gap: 1.4rem;
}
.boutique-results .product-card {
  max-width: 240px;
}
.boutique-results .product-card .product-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #f0f2f5;
}
.boutique-results .product-card .product-image img,
.boutique-results .product-card .product-image .product-image-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.boutique-results .product-card .product-desc {
  flex-grow: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 520px) {
  .boutique-results .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .boutique-results .product-card {
    max-width: 100%;
  }
}

/* Fiche produit */
.boutique-breadcrumb {
  margin-bottom: 1rem;
}
.boutique-breadcrumb a {
  color: #1a3c6e;
  text-decoration: none;
  font-weight: 600;
}
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.product-detail-main-image img {
  width: 100%;
  border-radius: 10px;
  background: #f0f2f5;
}
.product-detail-main-image.product-image-placeholder {
  aspect-ratio: 4 / 3;
}
.product-detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.product-detail-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e0e4ea;
}
.product-detail-cat {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .82rem;
  color: #6b7280;
  margin: 0 0 .3rem;
}
.product-detail-info h1 {
  margin: 0 0 .6rem;
}
.product-detail-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1a3c6e;
  margin: .6rem 0;
}
.product-detail-tva {
  font-size: .9rem;
  font-weight: 600;
  color: #6b7280;
}
.product-detail-long {
  margin: 1rem 0;
  line-height: 1.6;
}
.product-detail-actions {
  margin-top: 1.2rem;
}
.boutique-soon {
  margin-top: .6rem;
  font-style: italic;
}
.boutique-stock-ok { color: #1f7a3d; font-weight: 700; }
.boutique-stock-ko { color: #b25b00; font-weight: 700; }

@media (max-width: 720px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

/* ===== Panier boutique ===== */
.boutique-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1a3c6e;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}
.boutique-add.is-added {
  background: #1f7a3d;
  border-color: #1f7a3d;
}
.boutique-page-title {
  margin: 0 0 1.4rem;
}

.boutique-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}
.boutique-cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.boutique-cart-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--color-card-bg, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow-soft, 0 2px 10px rgba(0,0,0,.06));
  padding: .9rem 1rem;
}
.boutique-cart-thumb {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f2f5;
}
.boutique-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boutique-cart-thumb.product-image-placeholder {
  aspect-ratio: auto;
}
.boutique-cart-name {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.boutique-cart-name:hover { text-decoration: underline; }
.boutique-cart-unit {
  margin: .2rem 0 0;
  color: var(--color-muted, #6b7280);
  font-size: .9rem;
}
.boutique-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd4dc;
  border-radius: 999px;
  overflow: hidden;
}
.boutique-qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: #f3f4f6;
  font-size: 1.1rem;
  cursor: pointer;
}
.boutique-qty-btn:hover { background: #e5e7eb; }
.boutique-qty-input {
  width: 44px;
  height: 34px;
  border: none;
  text-align: center;
  font: inherit;
}
.boutique-cart-line {
  font-weight: 700;
  white-space: nowrap;
}
.boutique-cart-remove {
  border: none;
  background: none;
  color: #b23b3b;
  cursor: pointer;
  font-size: .9rem;
  text-decoration: underline;
}

.boutique-cart-summary {
  background: var(--color-card-bg, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow-soft, 0 2px 10px rgba(0,0,0,.06));
  padding: 1.3rem;
  position: sticky;
  top: 1rem;
}
.boutique-cart-summary h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.boutique-delivery { margin-bottom: 1rem; }
.boutique-delivery-title { font-weight: 700; margin: 0 0 .5rem; }
.boutique-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
}
.boutique-radio input { width: auto; margin: 0; }
.boutique-totals { margin: 1rem 0; }
.boutique-totals > div {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
}
.boutique-totals dt, .boutique-totals dd { margin: 0; }
.boutique-total-line {
  border-top: 1px solid #e5e7eb;
  margin-top: .4rem;
  padding-top: .7rem !important;
  font-weight: 800;
  font-size: 1.15rem;
}
.boutique-free-hint {
  font-size: .9rem;
  color: #1f7a3d;
  font-weight: 600;
  margin: 0 0 1rem;
}
.boutique-checkout-btn { display: block; text-align: center; margin-bottom: .6rem; }
.boutique-continue-btn { display: block; text-align: center; }

@media (max-width: 800px) {
  .boutique-cart-layout { grid-template-columns: 1fr; }
  .boutique-cart-summary { position: static; }
  .boutique-cart-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb info info"
      "thumb qty line"
      "thumb remove remove";
    row-gap: .5rem;
  }
  .boutique-cart-thumb { grid-area: thumb; width: 64px; height: 64px; }
  .boutique-cart-info { grid-area: info; }
  .boutique-qty { grid-area: qty; }
  .boutique-cart-line { grid-area: line; text-align: right; }
  .boutique-cart-remove { grid-area: remove; justify-self: start; }
}

/* ===== Boutique : lisibilite sur fond fonce + panier flottant ===== */

/* Correctif : l'attribut hidden doit toujours masquer */
.boutique-public [hidden] { display: none !important; }

/* Titres poses directement sur le fond fonce */
.boutique-public .boutique-page-title,
.boutique-public .boutique-cat-title { color: #ffffff; }
.boutique-public .boutique-breadcrumb a { color: #ffffff; }
.boutique-public .boutique-no-result { color: #e8edf5; }

/* Cartes produit claires et lisibles */
.boutique-public .product-card {
  background: #ffffff;
  color: #1f2933;
}
.boutique-public .product-card h2,
.boutique-public .product-card h3,
.boutique-public .product-card h3 a { color: #1f2933; }
.boutique-public .product-card .product-desc { color: #5a6472; }
.boutique-public .product-price { color: #143BF6; }

/* Fiche produit : bloc infos en carte blanche */
.boutique-public .product-detail { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
/* Sur mobile, une seule colonne (cette règle doit égaler la spécificité ci-dessus,
   sinon la media query générique de .product-detail est écrasée). */
@media (max-width: 720px) {
  .boutique-public .product-detail { grid-template-columns: minmax(0, 1fr); }
}
.boutique-public .product-detail-info {
  background: #ffffff;
  color: #1f2933;
  border-radius: 12px;
  padding: 1.5rem 1.7rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .16);
}
.boutique-public .product-detail-info h1 { color: #1f2933; }
.boutique-public .product-detail-cat { color: #6b7280; }
.boutique-public .product-detail-info .product-desc,
.boutique-public .product-detail-short,
.boutique-public .product-detail-long { color: #4a5360; }
.boutique-public .product-detail-price { color: #143BF6; }

/* Panier : lignes et recap en blanc lisible */
.boutique-public .boutique-cart-row,
.boutique-public .boutique-cart-summary {
  background: #ffffff;
  color: #1f2933;
}
.boutique-public .boutique-cart-name,
.boutique-public .boutique-cart-summary h2,
.boutique-public .boutique-delivery-title,
.boutique-public .boutique-totals dt,
.boutique-public .boutique-totals dd { color: #1f2933; }
.boutique-public .boutique-cart-unit { color: #5a6472; }
.boutique-public .boutique-radio span { color: #1f2933; }

/* Bouton panier flottant (toujours visible, haut a droite) */
/* Groupe flottant (Mon compte + Panier) en bas a droite */
.boutique-float-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.boutique-float-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: background-color .15s ease, transform .1s ease;
}
.boutique-float-btn:hover { transform: translateY(-1px); }
.boutique-float-account { background: #ffffff; color: #143BF6; }
.boutique-float-account:hover { background: #eef2ff; }
.boutique-cart-float { background: #143BF6; color: #ffffff; }
.boutique-cart-float:hover { background: #0f2db0; }
.boutique-cart-float .cart-badge { background: #ffffff; color: #143BF6; }
@media (max-width: 600px) {
  .boutique-float-actions { bottom: 16px; right: 16px; }
  .boutique-float-btn { padding: 11px 16px; font-size: 1rem; }
}

/* ===== Boutique : priorite forte contre style-pro.css (charge apres) ===== */
.boutique-public .product-card,
.boutique-public .boutique-cart-row,
.boutique-public .boutique-cart-summary,
.boutique-public .product-detail-info,
.boutique-public #cartEmpty {
  background: #ffffff !important;
  color: #1f2933 !important;
}
.boutique-public .product-card h2,
.boutique-public .product-card h3,
.boutique-public .product-card h3 a,
.boutique-public .product-detail-info h1,
.boutique-public .boutique-cart-name,
.boutique-public .boutique-cart-summary h2,
.boutique-public .boutique-delivery-title,
.boutique-public .boutique-totals dt,
.boutique-public .boutique-totals dd { color: #1f2933 !important; }
.boutique-public .product-card .product-desc,
.boutique-public .boutique-cart-unit,
.boutique-public .product-detail-cat,
.boutique-public .product-detail-short,
.boutique-public .product-detail-long { color: #5a6472 !important; }
.boutique-public .product-price,
.boutique-public .product-detail-price { color: #143BF6 !important; }

/* ===== Fiche produit : galerie interactive + lightbox ===== */
.boutique-public #mainProductImage { cursor: zoom-in; }
.product-detail-thumb {
  cursor: pointer;
  border: 2px solid transparent !important;
  transition: border-color .15s ease, transform .1s ease;
}
.product-detail-thumb:hover { transform: translateY(-1px); }
.product-detail-thumb.active { border-color: #143BF6 !important; }

.boutique-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.boutique-lightbox img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.boutique-lightbox-close {
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* ===== Comptes boutique (connexion / inscription / compte) ===== */
.boutique-public .boutique-auth-card {
  max-width: 460px;
  margin: 0 auto;
  background: #ffffff !important;
  color: #1f2933 !important;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .18);
  padding: 1.8rem;
}
.boutique-public .boutique-auth-title { color: #1f2933; margin: 0 0 1.2rem; }
.boutique-auth-form .form-group,
.boutique-account-card .form-group { margin-bottom: 1rem; }
.boutique-public .boutique-auth-card label,
.boutique-public .boutique-account-card label {
  display: block;
  font-weight: 600;
  margin-bottom: .3rem;
  color: #1f2933;
}
.boutique-public .boutique-auth-card input,
.boutique-public .boutique-account-card input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #1f2933;
}
.boutique-public .boutique-auth-card input:focus,
.boutique-public .boutique-account-card input:focus {
  outline: none;
  border-color: #143BF6;
  box-shadow: 0 0 0 3px rgba(20, 59, 246, .15);
}
.boutique-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.boutique-auth-submit { width: 100%; margin-top: .4rem; }
.boutique-auth-hint { font-size: .85rem; color: #6b7280; margin: -.3rem 0 1rem; }
.boutique-auth-switch { margin-top: 1.2rem; text-align: center; }
.boutique-public .boutique-auth-switch a { color: #143BF6; font-weight: 600; }
.boutique-auth-error {
  background: #fdecea; color: #b3261e; border: 1px solid #f5c2c0;
  padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem;
}
.boutique-auth-success {
  background: #e7f6ec; color: #1f7a3d; border: 1px solid #b6e0c4;
  padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem;
}

.boutique-account-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.boutique-public .boutique-account-hello { color: #e8edf5; margin-bottom: 1.4rem; }
.boutique-account-grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start;
}
.boutique-public .boutique-account-card {
  background: #ffffff !important; color: #1f2933 !important;
  border-radius: 14px; box-shadow: 0 10px 25px rgba(15, 23, 42, .18); padding: 1.5rem;
}
.boutique-public .boutique-account-card h2 { color: #1f2933; margin: 0 0 1rem; font-size: 1.3rem; }
.boutique-account-subh { color: #1f2933 !important; font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
@media (max-width: 760px) {
  .boutique-account-grid { grid-template-columns: 1fr; }
  .boutique-auth-grid { grid-template-columns: 1fr; }
}

/* ===== Pages legales (mentions, CGV, CGU, confidentialite) ===== */
.legal-page .legal-card {
  background: #ffffff;
  color: #1f2933;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .18);
  padding: 2rem 2.4rem;
}
.legal-page .legal-card h1 { color: #143BF6; margin: 0 0 .3rem; }
.legal-page .legal-card h2 { color: #1f2933; font-size: 1.3rem; margin: 1.7rem 0 .5rem; }
.legal-page .legal-card h3 { color: #1f2933; font-size: 1.05rem; margin: 1.1rem 0 .3rem; }
.legal-page .legal-card p,
.legal-page .legal-card li { color: #3a4250; }
.legal-page .legal-card ul { margin: .4rem 0 .9rem 1.3rem; }
.legal-page .legal-card a { color: #143BF6; }
.legal-page .legal-updated { color: #6b7280; font-style: italic; margin: 0 0 1.4rem; }
.legal-page .legal-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.legal-page .legal-block { margin-bottom: .6rem; }
.legal-page .legal-card strong { color: #1f2933; }

/* Coordonnées (page contact) : les adresses e-mail sont des mots insécables
   plus larges qu'un écran de téléphone — on autorise la coupure. */
.contact-coordinates h4 {
    overflow-wrap: anywhere;
}

/* ===== Bandeau cookies ===== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: #0e1c3a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 14px 22px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .3);
}
.cookie-banner-text { margin: 0; flex: 1 1 320px; font-size: .92rem; color: #fff; }
.cookie-banner-text a { color: #9ec1ff; }
.cookie-banner-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie-banner-btn { font-size: .9rem; padding: .55rem 1.1rem; }

/* ===== Choix du transporteur (panier) ===== */
.boutique-method {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f3;
}
.boutique-method:last-child { border-bottom: none; }
.boutique-method-name { flex: 1; }
.boutique-public .boutique-method-price {
  font-weight: 700;
  color: #143BF6;
  white-space: nowrap;
}

/* ===== Page commande (checkout) ===== */
.boutique-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 360px);
  gap: 1.5rem;
  align-items: start;
}
.boutique-checkout-main { display: flex; flex-direction: column; gap: 1.2rem; }
.boutique-public .boutique-checkout-login { padding: 1rem 1.3rem; }
.boutique-public .boutique-checkout-login a,
.boutique-public .boutique-cgv-check a { color: #143BF6; font-weight: 600; }
.boutique-checkout-summary { position: sticky; top: 1rem; }
.boutique-checkout-items { margin-bottom: 1rem; }
.boutique-checkout-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: .35rem 0; border-bottom: 1px solid #eef0f3;
}
.boutique-checkout-item:last-child { border-bottom: none; }
.boutique-public .boutique-checkout-item-price { font-weight: 700; white-space: nowrap; }
.boutique-cgv-check { margin: 1rem 0; align-items: flex-start; }
.boutique-account-pwd { margin-top: .8rem; }
.boutique-public .boutique-order-done { max-width: 640px; }
@media (max-width: 860px) {
  .boutique-checkout-layout { grid-template-columns: 1fr; }
  .boutique-checkout-summary { position: static; }
}

/* Liste des commandes (espace compte) */
.boutique-order-list { list-style: none; margin: 0; padding: 0; }
.boutique-order-item {
  display: flex; justify-content: space-between; gap: 12px;
  padding: .7rem 0; border-bottom: 1px solid #eef0f3;
}
.boutique-order-item:last-child { border-bottom: none; }
.boutique-order-amount { text-align: right; font-weight: 700; white-space: nowrap; }
.boutique-order-status { font-weight: 600; font-size: .8rem; color: #b25b00; }

/* Lisibilite du texte descriptif dans les cartes blanches (compte/checkout/paiement) */
.boutique-public .boutique-account-card .product-desc,
.boutique-public .boutique-checkout-summary .product-desc,
.boutique-public .boutique-auth-card .product-desc,
.boutique-public .boutique-order-done .product-desc,
.boutique-public .boutique-order-done li,
.boutique-public .boutique-order-done p {
  color: #3a4250 !important;
}
.boutique-public .boutique-account-card h2 { color: #1f2933 !important; }

/* ===== Configurateur machine (fiche produit) ===== */
.machine-config {
  margin: 1.2rem 0;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}
.boutique-public .machine-std summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2933;
  margin-bottom: .4rem;
}
.boutique-public .machine-std ul { margin: .3rem 0 .8rem 1.2rem; color: #4a5360; }
.boutique-public .machine-std li { font-size: .92rem; }
.boutique-public .machine-opt-title { font-size: 1.1rem; color: #1f2933; margin: 1rem 0 .5rem; }
.machine-options { list-style: none; margin: 0; padding: 0; }
.machine-option { border-bottom: 1px solid #eef0f3; }
.machine-option:last-child { border-bottom: none; }
.machine-option label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  cursor: pointer;
}
.machine-opt-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  line-height: 1.35;
}
.boutique-public .machine-opt-label { color: #1f2933; }
.machine-opt-label { flex: 1 1 0; min-width: 0; }
.boutique-public .machine-opt-price { font-weight: 700; color: #143BF6; white-space: nowrap; }
.machine-option input.machine-opt {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
.machine-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.machine-devis-form { margin-top: 1.4rem; border-top: 1px solid #e5e7eb; padding-top: 1rem; }
.boutique-public .machine-devis-form label { display: block; font-weight: 600; color: #1f2933; margin-bottom: .3rem; }
.machine-devis-form .form-group { margin-bottom: .8rem; }
.boutique-public .machine-devis-form input,
.boutique-public .machine-devis-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #1f2933;
}
.machine-config-total {
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.boutique-public .machine-config-total { color: #1f2933; }
.boutique-public .machine-config-total strong { color: #143BF6; }
.boutique-public .machine-config-note { font-size: .82rem; color: #6b7280; margin-top: .3rem; }

/* Référence d'option (configurateur machine) */
.boutique-public .machine-opt-ref { color: #6b7280; font-weight: 600; font-size: .85em; }

/* ============================
   Menu : lien Panier + badge compteur
   ============================ */
.nav-cart { position: relative; }
.nav-cart-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72em;
  font-weight: 800;
  text-align: center;
  line-height: 18px;
  vertical-align: middle;
}
.nav-cart-count[hidden] { display: none; }

/* Page Mon compte : choix d'espace */
.account-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.account-choice-card { display: flex; flex-direction: column; gap: 0.8rem; }
.account-choice-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: auto; }

/* Boutique : bouton "Voir le produit" toujours en bas de la carte */
.boutique-public .products-grid { align-items: stretch; }
.boutique-public .products-grid .product-card { height: 100%; }
.boutique-public .product-card .product-actions { margin-top: auto; margin-bottom: 0; }

/* Mobile : écart compte/menu réduit (le menu passe déjà à la ligne) */
@media (max-width: 768px) {
  .header .nav a[href="mon-compte.php"] { margin-left: 0.4rem; }
}

/* Page documentation : cartes PDF */
.doc-list { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; max-width: 760px; }
.boutique-public .doc-card {
  display: flex; align-items: center; gap: 0.9rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 0.9rem 1.1rem; text-decoration: none; color: #1f2933;
  box-shadow: 0 4px 12px rgba(15,23,42,.06); transition: box-shadow .15s ease, transform .05s ease;
}
.boutique-public .doc-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.12); transform: translateY(-1px); }
.doc-card-ico { font-size: 1.6rem; }
.doc-card-label { flex: 1; font-weight: 700; }
.doc-card-open { color: #143BF6; font-weight: 700; white-space: nowrap; }
.product-detail-doc { margin: 0.6rem 0; }

/* Bouton Documentation sous la photo produit */
.product-detail-media .product-detail-doc { margin: 0.9rem 0 0; }
.product-detail-media .product-detail-doc .btn-secondary { display: block; text-align: center; width: 100%; }

/* Liens PDF directs sous la photo (plusieurs = empilés) */
.product-detail-media .product-detail-doc { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.9rem 0 0; }

/* Carte produit : prix "À partir de ... HT" (machines sur devis) */
.boutique-public .product-price-from { font-size: 0.78em; font-weight: 600; color: #6b7280; }
.boutique-public .product-price-tva { font-size: 0.78em; font-weight: 600; color: #6b7280; }

/* Référence affichée sur la carte produit (boutique) */
.boutique-public .product-ref { margin: -0.2rem 0 0.1rem; font-size: 0.82rem; font-weight: 600; color: #6b7280; }
/* Dossier d'articles du produit (même arborescence que le stock) */
.boutique-public .product-fam { margin: 0 0 0.1rem; font-size: 0.78rem; color: #1c7a3f; }

/* ===== Prix HT/TTC boutique publique ===== */
.boutique-price-banner { background: rgba(20,59,246,0.14); border-bottom: 1px solid rgba(255,255,255,0.14); color: #eaf2ff; text-align: center; font-size: 0.92rem; padding: 0.55rem 1rem; }
.boutique-price-banner strong { color: #fff; }
.product-price-ttc { display: inline-block; font-size: 0.8rem; color: #64748b; font-weight: 500; margin-left: 0.35rem; }
.product-detail-ttc { display: inline-block; font-size: 1rem; color: #64748b; font-weight: 600; margin-left: 0.4rem; }

/* Carte boutique : description limitée à 3 lignes (désignation longue peut être longue) */
.boutique-public .product-card .product-desc { display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* Multiple d'achat (quantité minimum) */
.product-minqty { color:#1d4ed8; font-weight:700; font-size:.82rem; margin:.2rem 0 .1rem; }
.product-detail-minqty { color:#1d4ed8; font-weight:700; margin:.45rem 0; }
