:root {
    --fond: #f5f6f8;
    --carte: #fff;
    --texte: #1d2433;
    --doux: #667085;
    --bord: #e3e6eb;
    --marque: #0f766e;
    --marque-fort: #0b5d57;
    --danger: #b42318;
    --ok-fond: #e7f6ec;
    --ok-texte: #15703d;
    --ko-fond: #fdecea;
    --ko-texte: #b42318;
    --info-fond: #e8f1fb;
    --info-texte: #1d4f91;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--marque-fort); }
h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .75rem; }
small { display: block; color: var(--doux); }

.contenu { max-width: 1040px; margin: 0 auto; padding: 16px; }
.haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.menu { background: var(--carte); }
.menu nav a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--texte); }
.marque { font-weight: 700; }

@media (min-width: 800px) {
    .menu {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: 220px;
        padding: 20px 12px;
        border-inline-end: 1px solid var(--bord);
        display: flex;
        flex-direction: column;
    }
    .marque { padding: 0 10px 16px; }
    .menu nav { flex: 1; }
    .menu nav a { padding: 10px; border-radius: 8px; margin-bottom: 4px; }
    .menu nav a.actif { background: var(--ok-fond); color: var(--marque-fort); font-weight: 600; }
    .sortie { padding: 0 10px; }
    .avec-menu { margin-inline-start: 220px; margin-inline-end: 0; max-width: none; padding: 24px; }
}

/* Téléphone : barre d'onglets en bas, comme une application */
@media (max-width: 799.98px) {
    .marque, .sortie { display: none; }
    .menu {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 10;
        border-top: 1px solid var(--bord);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .menu nav { display: flex; }
    .menu nav a { flex: 1; flex-direction: column; gap: 2px; padding: 8px 4px; font-size: .75rem; min-height: 56px; justify-content: center; color: var(--doux); }
    .menu nav a.actif { color: var(--marque-fort); font-weight: 600; }
    .ico { font-size: 1.2rem; line-height: 1; }
    .avec-menu { padding-bottom: 90px; }
    .haut .langue { flex: none; }
}

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.etroite { max-width: 420px; margin-inline: auto; }
.centre { text-align: center; }
.carte > h2:first-child { margin-top: 0; }

label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
input, select {
    display: block;
    width: 100%;
    margin-top: 6px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c9ced6;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 400;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--marque); outline-offset: 1px; }

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--marque);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.bouton:hover { background: var(--marque-fort); }
.bouton.danger { background: var(--danger); }
.bouton.secondaire { background: #fff; color: var(--marque-fort); box-shadow: inset 0 0 0 1px var(--bord); }
.lien { background: none; border: 0; padding: 4px; color: var(--marque-fort); font: inherit; cursor: pointer; text-decoration: underline; }

.alerte { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.succes { background: var(--ok-fond); color: var(--ok-texte); }
.erreur { background: var(--ko-fond); color: var(--ko-texte); }
.info { background: var(--info-fond); color: var(--info-texte); }
.code { font-family: Consolas, monospace; user-select: all; }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.chiffre { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 14px; }
.chiffre strong { display: block; font-size: 1.5rem; }
.chiffre span { color: var(--doux); font-size: .9rem; }

.barre { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.recherche { flex: 1 1 200px; }
.recherche input { margin: 0; }

.tableau { overflow-x: auto; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: start; border-bottom: 1px solid var(--bord); white-space: nowrap; }
th { font-size: .85rem; color: var(--doux); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.pastille { padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.ok { background: var(--ok-fond); color: var(--ok-texte); }
.ko { background: var(--ko-fond); color: var(--ko-texte); }

.infos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 14px; }
.infos dt { color: var(--doux); }
.infos dd { margin: 0; overflow-wrap: anywhere; }
.infos dd[dir=ltr] { justify-self: start; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.outils { display: flex; align-items: center; gap: 8px; flex: none; }
.aide { color: var(--doux); font-size: .9rem; margin: 0 0 10px; }
textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 12px; border: 1px solid #c9ced6; border-radius: 8px; font: inherit; font-weight: 400; }
.barre > .grand { flex: 1 1 200px; width: auto; margin: 0; }
.barre > .auto, .barre > label { flex: 0 1 auto; width: auto; margin: 0; }
label.case { display: flex; align-items: center; gap: 8px; }
label.case input[type=checkbox] { width: 20px; min-height: 20px; margin: 0; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details[open] > summary { margin-bottom: 12px; }
.carte.barre { display: flex; }
.plein { width: 100%; margin-top: 12px; }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
tr.eteint td { color: var(--doux); }
td.retour { white-space: normal; min-width: 140px; }
.attention { background: #fff4e0; color: #93590a; }
.etiquette { display: inline-flex; align-items: center; gap: 4px; background: var(--fond); border-radius: 999px; padding: 2px 10px; }

.liens { display: grid; gap: 8px; }
.liens a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; color: var(--texte); text-decoration: none; font-weight: 600; }

.ligne-variante { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 10px; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 12px 0; margin-bottom: 10px; }
.galerie { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.galerie img, .galerie video { display: block; width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }

.caisse { display: grid; gap: 16px; }
.resultats { list-style: none; margin: 10px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.resultats button { display: block; width: 100%; min-height: 48px; padding: 8px 10px; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--bord); color: inherit; font: inherit; cursor: pointer; }
.resultats button:hover:not(:disabled) { background: var(--fond); }
.resultats button:disabled { opacity: .5; cursor: not-allowed; }
.ligne-panier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.ligne-panier .nom { flex: 1 1 100%; font-weight: 600; }
.ligne-panier input { width: 90px; margin: 0; }
.ligne-panier .prix { flex: 1; color: var(--doux); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; font-size: 1.05rem; }
.total strong { font-size: 1.25rem; }
.total.reste { color: var(--danger); }

@media (min-width: 800px) {
    .tel { display: none !important; }
    .caisse { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 799.98px) {
    .ordi { display: none !important; }
    th, td { padding: 9px 6px; font-size: .88rem; white-space: normal; }
    td.retour { min-width: 90px; }
}
@media print {
    .menu, .haut, .sans-impression, .alerte.succes { display: none !important; }
    .avec-menu { margin: 0; padding: 0; }
    body { background: #fff; }
    .carte, .tableau { border: 0; }
}

.ico { display: inline-flex; flex: none; }
.ico svg { width: 22px; height: 22px; }
.liens .ico { color: var(--marque-fort); }
.lien-sortie { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; }
.lien-sortie .ico { color: var(--danger); }

.erreur-texte { color: var(--danger); font-weight: 600; }
.liste-produits { max-height: 240px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 10px; padding: 6px 10px; margin-bottom: 14px; }
.liste-produits label { margin: 0; padding: 4px 0; font-weight: 400; }
.propositions small { margin-top: 10px; font-weight: 400; }
.rang-couleurs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pastille-couleur { width: 40px; height: 40px; border: 0; border-radius: 10px; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pastille-couleur.choisie { outline: 3px solid var(--texte); outline-offset: 2px; }

/* Finitions communes */
.nuancier { width: 70px; padding: 2px; }
.qr svg { display: block; width: 200px; height: 200px; }
.logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: #fff; }
.logo-lettre { color: #fff; font-weight: 700; }
.logo-grand { width: 64px; height: 64px; border-radius: 16px; font-size: 1.6rem; }
.avec-logo { display: inline-flex; align-items: center; gap: 10px; }
.entete-marque { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 1.15rem; }
.app-barre { display: none; }
.marque { display: flex; align-items: center; gap: 10px; }
.carte, .chiffre, .tableau { border-color: transparent; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07); }
.chiffre strong { color: var(--texte); }
.bouton { border-radius: 10px; transition: filter .15s, transform .05s; }
.bouton:hover { background: var(--marque); filter: brightness(.92); }
.bouton:active { transform: translateY(1px); }
.bouton.secondaire:hover { background: var(--fond); filter: none; }
.bouton.danger:hover { background: var(--danger); }
input, select, textarea { border-radius: 10px; border-color: #d5d9e0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--marque); outline-offset: 0; border-color: transparent; }
th { background: #fafbfc; }
.menu nav a.actif { background: color-mix(in srgb, var(--marque) 12%, white); color: var(--marque-fort); }
.menu nav a { transition: background .15s; }
.menu nav a:hover:not(.actif) { background: var(--fond); }

/* Téléphone : cartes, grands boutons, rien de coupé */
@media (max-width: 799.98px) {
    html { scrollbar-width: none; }
    body { font-size: 15px; }
    h1 { font-size: 1.2rem; }
    h2 { font-size: 1rem; }
    .contenu { padding: 12px; }
    .haut { margin-bottom: 12px; }
    .sortie-haut { display: none; }
    .carte, .chiffre, .liens a, .lien-sortie { border-color: transparent; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); border-radius: 14px; }
    .chiffres { grid-template-columns: 1fr 1fr; gap: 10px; }
    .chiffre { padding: 12px; min-width: 0; }
    .chiffre strong { font-size: 1.1rem; }
    .chiffre span { font-size: .8rem; }
    .barre { gap: 8px; }
    .barre > .bouton, .barre > a.bouton, .barre > form, .barre > form .bouton { flex: 1 1 100%; width: 100%; }
    .barre > select.auto { flex: 1 1 40%; min-width: 0; }
    .barre > label.auto { flex: 1 1 40%; min-width: 0; }
    .actions .bouton { flex: 1 1 auto; }
    .infos { grid-template-columns: 1fr auto; gap: 8px 12px; }
    .infos dd { text-align: end; }
    .infos dd[dir=ltr] { justify-self: end; }

    /* Lignes de tableau en cartes */
    .tableau:has(.en-cartes) { background: none; border: 0; overflow: visible; border-radius: 0; }
    .en-cartes, .en-cartes tbody, .en-cartes tr, .en-cartes td { display: block; }
    .en-cartes thead { display: none; }
    .en-cartes tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; background: var(--carte); border-radius: 14px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); padding: 12px 14px; margin-bottom: 10px; }
    .en-cartes td { padding: 0; border: 0; font-size: .92rem; white-space: normal; min-width: 0; }
    .en-cartes td::before { content: attr(data-titre); display: block; color: var(--doux); font-size: .76rem; }
    .en-cartes td:first-child { grid-column: 1 / -1; font-weight: 600; font-size: 1rem; }
    .en-cartes td:first-child::before { display: none; }
    .en-cartes td:not([data-titre]) { grid-column: 1 / -1; }
    .en-cartes td small { display: inline; margin-inline-start: 6px; font-weight: 400; }
    .app-barre { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; padding: 10px 14px; background: var(--marque); color: #fff; }
    .app-barre strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-barre .lien { color: #fff; font-size: .85rem; }
    .avec-menu .outils { display: none; }
    .menu .marque { display: none; }
    .app-barre .logo { box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); }
    .menu nav a.actif { background: none; }
    .menu nav a.actif .ico { color: var(--marque-fort); }
    .en-cartes td.vide-cellule { display: none; }
    .recu .en-cartes tr { box-shadow: none; background: var(--fond); }
    .menu nav a .ico svg { width: 23px; height: 23px; }
    .ligne-variante { border-color: transparent; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); border-radius: 14px; grid-template-columns: 1fr 1fr; }
}

.vide { padding: 28px 16px; text-align: center; color: var(--doux); }
.vitrine { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.vitrine .carte { width: 100%; }

/* Tableau de bord du commerce */
.bord { display: grid; gap: 16px; }
.bord-principal, .bord-cote { display: grid; gap: 14px; align-content: start; min-width: 0; }
.bord-cote h2 { margin: 6px 0 10px; }
.bord-cote .titre-section { margin: 6px 0 10px; }
.bord-cote .titre-section h2 { margin: 0; }
.bord-heros { display: flex; flex-direction: column; padding: 20px; border-radius: 18px; background: linear-gradient(140deg, #0f766e, #0b4f4a); color: #fff; }
.bord-date { font-size: .8rem; opacity: .8; }
.bord-libelle { margin-top: 12px; font-size: .9rem; opacity: .9; }
.bord-chiffre { font-size: 2.1rem; font-weight: 700; line-height: 1.25; }
.bord-details { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: .84rem; }
.bord-evolution { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-weight: 700; }
.bord-benefice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .22); font-size: .9rem; }
.bord-benefice strong { font-size: 1.1rem; }
.bord-vente { gap: 10px; min-height: 54px; margin: 0; font-size: 1.05rem; }
.bord-raccourcis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bord-raccourcis a { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 96px; padding: 14px 6px; border-radius: 16px; background: var(--carte); box-shadow: var(--ombre); color: var(--texte); font-size: .8rem; font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none; }
.bord-raccourcis .ico { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #e6f4f2; color: #0f766e; }
.bord-graphique { margin: 0; }
.bord-graphique .titre-section { margin: 0 0 4px; }
.bord-valeur { min-height: 22px; margin: 0 0 12px; color: var(--doux); font-size: .86rem; }
.barres { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.barre-jour { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 3px; border: 0; background: none; color: var(--doux); font: inherit; cursor: pointer; }
.barre-piste { display: flex; align-items: flex-end; width: 100%; height: 110px; border-bottom: 1px solid var(--bord); }
.barre-valeur { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #a7d8d2; transition: background .15s; }
.barre-jour.choisie .barre-valeur { background: #0f766e; }
.barre-jour.choisie { color: var(--texte); font-weight: 700; }
.barre-jour-nom { overflow: hidden; max-width: 100%; font-size: .72rem; white-space: nowrap; }
.avec-icone { display: flex; align-items: center; gap: 10px; }
.avec-icone .ico { color: #0f766e; }
.compteur { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: #fdecea; color: var(--danger); font-size: .82rem; }
.bord-rien { padding: 18px 16px; color: var(--doux); text-align: center; }
.liste-simple small { display: block; margin: 0; color: var(--doux); }
@media (min-width: 800px) {
    .bord { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 20px; }
    .bord-chiffre { font-size: 2.6rem; }
    .bord-raccourcis a { min-height: 104px; font-size: .86rem; }
    .barre-piste { height: 150px; }
}
.titre-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.titre-section h2 { margin: 0; }
.titre-section a { font-size: .88rem; font-weight: 600; text-decoration: none; }
.liste-simple { border-radius: 16px; background: var(--carte); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05); overflow: hidden; }
.liste-simple a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border-bottom: 1px solid #f0f1f4; color: var(--texte); text-decoration: none; }
.liste-simple a:last-child { border-bottom: 0; }
.lien-alerte { display: block; text-decoration: none; font-weight: 600; }
/* Preuve de paiement : aperçu avant l'envoi, et vérification par le commerçant */
.preuve { margin-bottom: 16px; }
.preuve-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; margin: 0; padding: 14px; border: 1.5px dashed #c9ced6; border-radius: 14px; background: #fafbfc; color: var(--marque-fort); font-weight: 600; text-align: center; cursor: pointer; }
.preuve-zone input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; }
.preuve-zone:focus-within { outline: 2px solid var(--marque); }
.preuve-apercu { padding: 12px; border: 1px solid var(--bord); border-radius: 14px; background: #fafbfc; }
.preuve-image { display: block; margin-bottom: 12px; text-decoration: none; }
.preuve-image img { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; background: #e5e7eb; }
.preuve-pdf { display: flex; align-items: center; justify-content: center; height: 110px; border-radius: 10px; background: #e5e7eb; color: var(--danger); font-size: 1.4rem; font-weight: 700; }
.preuve-nom { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.preuve-infos .aide { margin: 6px 0 10px; }
.preuve-infos .actions .bouton { flex: 1; min-height: 42px; padding: 6px 12px; }
.preuve-erreur { margin: 8px 0 0; font-size: .88rem; }
.preuve-a-verifier { display: block; margin-bottom: 12px; }
.preuve-a-verifier img { display: block; width: 100%; max-height: 460px; object-fit: contain; border: 1px solid var(--bord); border-radius: 12px; background: #f3f4f6; }
td .preuve-a-verifier img { width: 120px; height: 120px; }

/* Preuve compacte, comme une ligne d'application */
.preuve-zone { flex-direction: row; gap: 10px; min-height: 60px; padding: 10px 14px; }
.preuve-apercu { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; }
.preuve-image { margin: 0; }
.preuve-image img { width: 72px; height: 72px; max-height: none; object-fit: cover; }
.preuve-pdf { width: 72px; height: 72px; font-size: 1rem; }
.preuve-infos { min-width: 0; }
.preuve-infos small { display: inline; margin: 0; }
.preuve-infos .actions { gap: 8px; margin-top: 6px; }
.preuve-infos .actions .bouton { flex: 0 1 auto; min-height: 34px; padding: 3px 12px; border-radius: 9px; font-size: .82rem; }
.preuve-a-verifier img { max-height: 220px; }
td .preuve-a-verifier img { width: 72px; height: 72px; object-fit: cover; }

/* Cartes de livraison */
.bloc-carte { margin-bottom: 18px; }
.carte-choix, .carte-lecture { isolation: isolate; width: 100%; border-radius: 14px; background: #e5e7eb; direction: ltr; }
.carte-choix { height: 300px; }
.carte-lecture { height: 200px; margin-bottom: 12px; }
.carte-etat { min-height: 24px; margin: 8px 0; color: var(--doux); font-size: .88rem; }
.ok-texte { color: var(--ok-texte); font-weight: 600; }
.attention-texte { color: #93590a; font-weight: 600; }
.epingle { width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: var(--marque); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transform: rotate(-45deg); }

/* Ajout rapide d'un produit */
.ajout-rapide { max-width: 620px; }
.ajout-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ajout-photo input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; }
.ajout-photo-zone { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; min-height: 110px; padding: 12px; border: 1.5px dashed #c9ced6; border-radius: 14px; background: #fafbfc; color: var(--marque-fort); font-weight: 600; cursor: pointer; }
.ajout-photo input:focus-visible + .ajout-photo-zone { outline: 2px solid var(--marque); }
.ajout-photo-zone img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.ajout-choix { margin-bottom: 16px; }
.ajout-titre { display: block; margin-bottom: 8px; color: #374151; font-size: .875rem; font-weight: 600; }
.ajout-titre small { display: inline; color: var(--doux); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { margin: 0; cursor: pointer; }
.puce input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; opacity: 0; }
.puce span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 42px; padding: 6px 14px; border: 1px solid #d9dce3; border-radius: 999px; background: #fff; color: var(--texte); font-weight: 500; }
.puce input:checked + span { border-color: var(--marque); background: var(--marque); color: #fff; }
.puce input:focus-visible + span { outline: 2px solid var(--marque); outline-offset: 2px; }
.ajout-boutons { display: grid; gap: 10px; }

/* ==== Mise en forme générale : champs, espaces, pages ==== */
:root { --fond: #f4f5f7; --bord: #e6e8ec; --texte: #1b2130; --doux: #6b7280; --ombre: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05); }

body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.45rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 12px; }
.carte > h2:first-child, form > h2:first-child { margin-top: 0; margin-bottom: 16px; }
.aide { line-height: 1.6; margin-bottom: 14px; }
small { margin-top: 4px; font-size: .8rem; font-weight: 400; line-height: 1.5; }

/* Pages */
.contenu { max-width: 1180px; padding: 20px 16px 32px; }
.haut { margin-bottom: 20px; min-height: 40px; }
.carte { padding: 22px; margin-bottom: 18px; box-shadow: var(--ombre); }
.tableau { margin-bottom: 18px; box-shadow: var(--ombre); }
.chiffres { gap: 14px; margin-bottom: 20px; }
.chiffre { padding: 18px; box-shadow: var(--ombre); }
.chiffre strong { font-size: 1.35rem; line-height: 1.3; margin-bottom: 2px; }
.barre { gap: 12px; margin-bottom: 18px; }
.actions { gap: 12px; margin-top: 6px; }
.vide { padding: 40px 16px; background: var(--carte); border-radius: 16px; margin-bottom: 18px; box-shadow: var(--ombre); }

/* Champs */
label { display: block; margin-bottom: 18px; color: #374151; font-size: .875rem; font-weight: 600; }
input, select, textarea {
    margin-top: 7px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d9dce3;
    border-radius: 12px;
    background-color: #fff;
    color: var(--texte);
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a0a6b1; }
input:hover, select:hover, textarea:hover { border-color: #b9bec9; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--marque); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marque) 18%, transparent); }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

select {
    -webkit-appearance: none;
    appearance: none;
    padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
[dir=rtl] select { background-position: left 14px center; }

input[type=file] { padding: 8px; border-style: dashed; background: #fafbfc; color: var(--doux); font-size: .85rem; cursor: pointer; }
input[type=file]::file-selector-button { min-height: 30px; margin-inline-end: 12px; padding: 4px 14px; border: 1px solid var(--bord); border-radius: 8px; background: #fff; color: var(--texte); font: inherit; font-weight: 600; cursor: pointer; }

input[type=color].nuancier { width: 64px; min-height: 46px; padding: 4px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--marque); }
label.case { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--texte); font-size: .92rem; font-weight: 500; cursor: pointer; }
label.case input[type=checkbox] { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 0; box-shadow: none; }
.barre > input, .barre > select, .barre > .grand, .barre > .auto { margin-top: 0; }
.barre > label { margin-bottom: 0; }

/* Boutons */
.bouton { min-height: 46px; padding: 10px 22px; border-radius: 12px; font-size: .95rem; white-space: nowrap; }
.bouton.secondaire { background: #fff; box-shadow: none; border: 1px solid #d9dce3; color: var(--texte); }
.bouton.secondaire:hover { background: #f8f9fb; border-color: #b9bec9; }
.lien { text-decoration: none; font-weight: 600; }
.lien:hover { text-decoration: underline; }
.plein { margin-top: 8px; }

/* Sections pliables */
details.carte > summary { display: flex; align-items: center; justify-content: space-between; min-height: 28px; list-style: none; font-size: 1rem; font-weight: 700; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary::after { content: '+'; color: var(--doux); font-size: 1.3rem; font-weight: 400; line-height: 1; }
details.carte[open] > summary { margin-bottom: 18px; }
details.carte[open] > summary::after { content: '−'; }

/* Tableaux */
th { padding: 13px 16px; background: #fafbfc; font-size: .8rem; }
td { padding: 14px 16px; font-size: .93rem; }
tbody tr:hover td { background: #fafbfc; }
.pastille { display: inline-block; padding: 3px 11px; line-height: 1.5; font-size: .8rem; }

/* Messages */
.alerte { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; line-height: 1.6; }

/* Fiches : libellé d'un côté, valeur de l'autre */
.infos { gap: 0; margin-bottom: 18px; }
.infos dt, .infos dd { padding: 9px 0; border-bottom: 1px solid #f0f1f4; }
.infos dt { padding-inline-end: 24px; font-size: .9rem; }
.infos dt:last-of-type, .infos dd:last-of-type { border-bottom: 0; }
.infos dd[dir=ltr] { justify-self: stretch; text-align: start; unicode-bidi: plaintext; }
.total { padding: 11px 0; }

.liens { gap: 10px; }
.liens a, .lien-sortie { min-height: 56px; padding: 12px 16px; border-radius: 14px; border: 0; box-shadow: var(--ombre); }
.ligne-variante { gap: 0 14px; padding: 18px 18px 2px; margin-bottom: 14px; border: 0; border-radius: 16px; box-shadow: var(--ombre); }
.ligne-variante label { margin-bottom: 16px; }
.etiquette { padding: 4px 12px; }
.liste-produits { padding: 8px 14px; border-radius: 12px; }
.liste-produits label.case { margin: 0; padding: 6px 0; }

/* Connexion : au centre, sans titre en double */
.contenu:not(.avec-menu) .haut { justify-content: flex-end; }
.contenu:not(.avec-menu) .haut h1 { display: none; }
.contenu:not(.avec-menu) .etroite { margin-top: 4vh; padding: 28px; }
.entete-marque { margin-bottom: 24px; font-weight: 700; }

@media (min-width: 800px) {
    .menu { width: 240px; padding: 20px 14px; }
    .marque { padding: 0 8px 20px; }
    .menu nav a { padding: 11px 12px; border-radius: 10px; font-size: .93rem; }
    .avec-menu { margin-inline-start: 240px; padding: 28px 32px 40px; max-width: none; }
    .avec-menu > * { max-width: 1120px; margin-inline: auto; }
    .barre > .auto { min-width: 170px; }

    /* Formulaires sur deux colonnes, pour ne pas étirer les champs sur tout l'écran */
    form.carte:not(.barre):not(.etroite), form > .carte, details.carte > form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 22px;
        align-items: start;
    }
    form.carte:not(.barre):not(.etroite) > *, form > .carte > *, details.carte > form > * { grid-column: 1 / -1; }
    form.carte:not(.barre):not(.etroite) > label:not(.case), form > .carte > label:not(.case), details.carte > form > label:not(.case) { grid-column: auto; }
    form.carte > .bouton, form > .carte > .bouton, details.carte > form > .bouton { justify-self: start; }
    form.carte > .bouton.plein { justify-self: stretch; }
    .caisse form.carte { display: block; }
    .caisse { gap: 18px; }
}

@media (max-width: 799.98px) {
    body { font-size: 15px; }
    h1 { font-size: 1.2rem; }
    .contenu { padding: 14px 14px 24px; }
    .avec-menu { padding-bottom: 92px; }
    .haut { margin-bottom: 14px; min-height: 0; }
    .carte { padding: 18px 16px; margin-bottom: 14px; border-radius: 16px; }
    .chiffres { gap: 10px; margin-bottom: 16px; }
    .chiffre { padding: 14px; }
    .chiffre strong { font-size: 1.1rem; }
    .chiffre:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .barre { gap: 10px; margin-bottom: 14px; }
    label { margin-bottom: 16px; }
    /* 16 px : sinon le téléphone zoome tout seul quand on touche un champ */
    input, select, textarea { font-size: 16px; min-height: 48px; }
    .bouton { min-height: 48px; }
    .ligne-variante { padding: 16px 14px 2px; }
    .en-cartes tr { padding: 14px 16px; border-radius: 16px; box-shadow: var(--ombre); }
    .en-cartes td { font-size: .92rem; }
    tbody tr:hover td { background: none; }
    .infos { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
    .infos dd, .infos dd[dir=ltr] { text-align: end; justify-self: stretch; }
    .contenu:not(.avec-menu) .etroite { margin-top: 2vh; padding: 24px 18px; }
}

/* Vente sur commande */
.info-commande { display: grid; gap: 4px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--fond); font-size: .9rem; }
.info-commande label { margin: 6px 0 0; }
.demande-haut { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.demande-haut img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.demande-haut small { display: block; color: var(--doux); }
.recu table td:last-child { text-align: end; white-space: nowrap; }
.recu table td { padding: 6px 0; }
.lien-demande { display: block; margin: 16px 0 4px; padding: 14px; border-radius: 12px; background: var(--fond); text-align: center; font-weight: 600; text-decoration: none; }

/* Abonnement à la plateforme */
.abo-etat { padding: 16px; margin-bottom: 14px; border-radius: 16px; background: var(--carte); box-shadow: 0 1px 3px rgba(16, 24, 40, .08); border-inline-start: 4px solid var(--marque); }
.abo-etat.alerte-fin { border-inline-start-color: #d97706; }
.abo-etat.bloque { border-inline-start-color: var(--danger); }
.abo-haut, .abo-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.abo-haut small { display: block; color: var(--doux); font-size: .8rem; }
.abo-haut strong { font-size: 1.2rem; }
.abo-date { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f1f4; font-size: .92rem; }
.abo-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; font-size: .85rem; color: var(--doux); }
.abo-usage span { padding: 8px 10px; border-radius: 10px; background: var(--fond); }
.abo-usage b { display: block; color: var(--texte); }
.abo-attente p { margin: 8px 0 0; }
.plans-choix { display: grid; gap: 10px; margin-bottom: 14px; }
.plan-choix { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; border: 1.5px solid var(--bord); border-radius: 14px; background: var(--carte); font-weight: 400; cursor: pointer; }
.plan-choix input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; box-shadow: none; }
.plan-choix:has(input:checked) { border-color: var(--marque); background: color-mix(in srgb, var(--marque) 6%, white); }
.plan-corps { flex: 1; min-width: 0; display: grid; gap: 4px; }
.plan-tete { display: flex; justify-content: space-between; gap: 10px; }
.plan-corps small { color: var(--doux); }
.plan-modules { display: flex; flex-wrap: wrap; gap: 4px; }
.plan-modules i { padding: 1px 8px; border-radius: 999px; background: var(--fond); font-size: .75rem; font-style: normal; }
.plan-details { margin-bottom: 10px; }
.plan-details summary small { display: block; color: var(--doux); font-weight: 400; }
.tache-plateforme { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; background: var(--info-fond); color: var(--info-texte); font-weight: 600; text-decoration: none; }
.tache-plateforme b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--info-texte); color: #fff; }
.tache-plateforme .fleche { margin-inline-start: auto; }
.fleche { flex: none; font-size: 1.3rem; line-height: 1; }
[dir=rtl] .fleche { display: inline-block; transform: scaleX(-1); }
.preuve-a-verifier img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; background: #e5e7eb; }
