/* Polices hébergées sur le site (SIL OFL, licences dans public/fonts) :
   Inter pour toute l'application, Montserrat seulement pour le nom dans le logo. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/montserrat-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* MecaLogic Web — styles de base. Couleur OR : #F3C08D (charte MecaLogic). */
:root {
    --fond: #eef1f5;
    --surface: #ffffff;
    --texte: #2b3138;
    --discret: #616e7c;
    --bordure: #d9dee4;
    --primaire: #1d65a6;
    --primaire-fonce: #174f82;
    --marque-bleu: #2474bc;
    --marque-gris: #666767;
    --erreur: #b3261e;
    --or: #F3C08D;
    --rayon: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    color: var(--texte);
    background: var(--fond);
}

h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.discret { color: var(--discret); margin-top: 0; }

/* Barre du haut */
.barre {
    display: flex; align-items: center; gap: 2rem;
    padding: 0 1.25rem; height: 52px;
    background: var(--primaire); color: #fff;
}
.marque { color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .02em; }
.menu { display: flex; gap: .25rem; flex: 1; }
.menu a { color: #dbe7f2; text-decoration: none; padding: .35rem .7rem; border-radius: var(--rayon); }
.menu a:hover, .menu a.actif { background: var(--primaire-fonce); color: #fff; }
.utilisateur { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.utilisateur small { color: #b8cde0; }
.utilisateur form { margin: 0; }
.lien { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

.contenu { max-width: 1320px; margin: 0 auto; padding: 1.5rem 1.25rem; }
/* Fiche OR : plus large sur les grands écrans, au profit des tables de lignes et de travaux. */
.contenu:has(.or-page) { max-width: 1680px; }

/* Cartes et tuiles */
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.5rem; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tuile { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.25rem; }

/* Formulaires */
.connexion { max-width: 380px; margin: 8vh auto 0; }
label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
label.case { font-weight: 400; display: flex; align-items: center; gap: .5rem; }
input[type=email], input[type=password], input[type=text] {
    width: 100%; padding: .55rem .7rem; font: inherit;
    border: 1px solid var(--bordure); border-radius: var(--rayon); background: #fff;
}
input:focus { outline: 2px solid var(--primaire); outline-offset: 1px; }
input[aria-invalid=true] { border-color: var(--erreur); }
.erreur { color: var(--erreur); font-size: .875rem; margin: .3rem 0 0; }
.bouton {
    margin-top: 1.25rem; width: 100%; padding: .6rem 1rem; font: inherit; font-weight: 600;
    color: #fff; background: var(--primaire); border: 0; border-radius: var(--rayon); cursor: pointer;
}
.bouton:hover { background: var(--primaire-fonce); }

@media (max-width: 700px) {
    .barre { flex-wrap: wrap; height: auto; padding: .5rem 1rem; gap: .5rem 1rem; }
    .menu { order: 3; flex-basis: 100%; overflow-x: auto; }
}

/* ------------------------------------------------------------------
   Fiches de saisie — modèle « Fiche moteur » de MecaLogic WinDev :
   en-tête (titre, Actif, Annuler, Enregistrer), blocs blancs titrés en
   petites capitales, libellés au-dessus des champs, deux colonnes.
   ------------------------------------------------------------------ */
:root {
    --fiche-fond: #eef1f5;
    --bloc-bordure: #c3cfdd;
    --champ-bordure: #dde3ea;
    --bleu-action: #2474bc;
    --bleu-action-fonce: #1b5c97;
    --succes: #1e7a46;
}


.fiche { display: flex; flex-direction: column; gap: 1rem; }
.fiche-entete {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--bloc-bordure); border-radius: 2px;
    padding: .9rem 1rem;
}
.fiche-entete h1 { font-size: 1.05rem; margin: 0; font-weight: 700; }
.fiche-actions { display: flex; align-items: center; gap: 1rem; }
.fiche-actions .case { margin: 0 1.5rem 0 0; color: var(--discret); }
.fiche-corps { border: 0; padding: 0; margin: 0; min-width: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.fiche-pied { display: flex; gap: 2.5rem; flex-wrap: wrap; color: var(--discret); font-size: .875rem; padding: 0 .25rem; }
.fiche-pied strong { color: var(--texte); font-weight: 500; margin-left: .75rem; }

.bloc {
    background: var(--surface); border: 1px solid var(--bloc-bordure); border-radius: 2px;
    padding: .9rem 1rem 1.1rem; min-width: 0; position: relative;
}
.bloc-titre {
    font-size: .72rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
    color: #3b4754; margin: 0 0 .9rem;
}
.bloc-outils { position: absolute; top: .55rem; right: 1rem; }
.grille { display: grid; gap: .55rem 1.5rem; }
.grille-1 { grid-template-columns: 1fr; }
.grille-2 { grid-template-columns: 1fr 1fr; }
.grille-3 { grid-template-columns: 1fr 1fr 1fr; }
.champ { min-width: 0; }
.champ-large { grid-column: 1 / -1; }
.champ label { font-weight: 400; font-size: .85rem; margin: 0 0 .15rem; color: #2f3a45; }
.champ-case { align-self: end; padding-bottom: .2rem; }
.champ .case { font-size: .875rem; margin: 0; }
.aide { color: var(--discret); font-size: .75rem; }

.fiche input[type=text], .fiche input[type=email], .fiche input[type=tel], .fiche input[type=number],
.fiche input[type=date], .fiche input[type=datetime-local], .fiche select, .fiche textarea {
    width: 100%; padding: .3rem .5rem; font: inherit; font-size: .875rem; color: var(--texte);
    border: 1px solid var(--champ-bordure); border-radius: 3px; background: #fff; min-height: 30px;
}
.fiche select { border-color: #b9c6d6; }
.fiche textarea { resize: vertical; }
.fiche input.nombre { text-align: right; }
.fiche input:focus, .fiche select:focus, .fiche textarea:focus { outline: 2px solid var(--bleu-action); outline-offset: 0; border-color: transparent; }
.fiche [aria-invalid=true] { border-color: var(--erreur); background: #fff7f6; }
.fiche fieldset:disabled input, .fiche fieldset:disabled select, .fiche fieldset:disabled textarea {
    background: #f7f9fb; color: var(--texte); opacity: 1;
}
input[type=checkbox] { accent-color: var(--bleu-action); width: 15px; height: 15px; }

.bouton-primaire, .bouton-secondaire {
    display: inline-flex; align-items: center; justify-content: center; min-width: 96px;
    padding: .55rem 1.1rem; font: inherit; font-size: .9rem; font-weight: 500; border-radius: 6px;
    cursor: pointer; text-decoration: none; line-height: 1.2;
}
.bouton-primaire { color: #fff; background: var(--bleu-action); border: 1px solid var(--bleu-action); }
.bouton-primaire:hover { background: var(--bleu-action-fonce); }
.bouton-secondaire { color: var(--texte); background: #fff; border: 1px solid #c9d1da; }
.bouton-secondaire:hover { background: #f3f5f8; }
.bouton-petit { min-width: 0; padding: .3rem .7rem; font-size: .8rem; }

.message { margin: 0; padding: .6rem .9rem; border-radius: 4px; font-size: .9rem; }
.message-succes { background: #e8f5ee; color: var(--succes); border: 1px solid #b8dfc8; }
.message-erreur { background: #fdeceb; color: var(--erreur); border: 1px solid #f2c2be; }

/* Tableaux (listes et sous-listes des fiches) */
.tableau-cadre { border: 1px solid var(--champ-bordure); border-radius: 4px; overflow-x: auto; background: #fff; }
.tableau { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tableau th { background: #d5dde8; color: #2f3a45; font-weight: 500; text-align: left; padding: .5rem .7rem; white-space: nowrap; }
.tableau td { padding: .45rem .7rem; border-top: 1px solid #edf0f4; }
.tableau tbody tr:hover { background: #f5f8fc; }
.tableau td.nombre, .tableau th.nombre { text-align: right; }
.tableau a { color: var(--primaire); text-decoration: none; font-weight: 500; }
.tableau a:hover { text-decoration: underline; }
.tableau .vide { color: var(--discret); text-align: center; padding: 1.2rem; }
.inactif { color: var(--discret); }
.pastille { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; background: #e7ecf2; color: #3b4754; }

/* Pages de liste */
.liste-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
/* Rappel de l'icône du menu avant le titre de la page (Regis, 03/11/2026) : masque CSS --icone-page posé par le layout. */
.titre-icone h1:not(.or-titre h1, .facture-entete h1) { display: inline-flex; align-items: center; gap: .6rem; }
.titre-icone h1:not(.or-titre h1, .facture-entete h1)::before { content: ''; width: 1.6em; height: 1.6em; flex: none; background: var(--primaire);
    -webkit-mask: var(--icone-page) center / 100% no-repeat; mask: var(--icone-page) center / 100% no-repeat; }
.liste-entete h1 { margin: 0; font-size: 1.25rem; }
.recherche { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.recherche input[type=search] { width: 280px; max-width: 100%; padding: .45rem .7rem; font: inherit; font-size: .9rem; border: 1px solid var(--bordure); border-radius: 6px; background: #fff; }
.recherche .case { font-weight: 400; margin: 0; font-size: .875rem; }
.pagination { margin-top: 1rem; }
.pagination nav { display: flex; gap: .25rem; flex-wrap: wrap; }

@media (max-width: 900px) {
    .fiche-corps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .grille-2, .grille-3 { grid-template-columns: 1fr; }
    .fiche-actions { width: 100%; justify-content: flex-end; }
}
.fil { margin: 0 0 .6rem; font-size: .875rem; }
.fil a, .bloc a, .fiche-pied a { color: var(--primaire); text-decoration: none; }
.fil a:hover, .bloc a:hover, .fiche-pied a:hover { text-decoration: underline; }
a.tuile { color: inherit; text-decoration: none; display: block; }
a.tuile:hover { border-color: var(--bleu-action); }

/* ------------------------------------------------------------------
   Coque de l'application : menu latéral (repliable sur téléphone)
   ------------------------------------------------------------------ */
:root { --menu-largeur: 244px; --menu-fond: #142c44; --menu-texte: #b9c8d8; }

body.avec-menu { padding-left: var(--menu-largeur); }
.menu-bascule { position: absolute; opacity: 0; pointer-events: none; }
.barre-mobile { display: none; }

.menu-lateral {
    position: fixed; inset: 0 auto 0 0; width: var(--menu-largeur); z-index: 30;
    display: flex; flex-direction: column; background: var(--menu-fond); color: var(--menu-texte);
    padding: 1.1rem .75rem .75rem; overflow-y: auto;
}
/* Menu plus haut que l'écran : il défile, sans écraser le logo, le badge ni la houle (sinon la bande animée tombe à 2 px). */
.menu-lateral > * { flex-shrink: 0; }
.menu-lateral .marque, .barre-mobile .marque {
    font-size: 1.25rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: .01em;
}
.menu-lateral .marque { padding: 0 .65rem; margin-bottom: 1.25rem; }
/* Activité de l'utilisateur (Atelier / Magasin), sous le logo. */
.menu-lateral .marque:has(+ .badge-activite) { margin-bottom: .55rem; }
/* Centré dans le menu, donc sous le mot « mecalogic » (Regis, 03/11/2026). */
.badge-activite { align-self: center; margin: 0 0 1.1rem; padding: .12rem .6rem; border-radius: 999px;
    font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.badge-activite-1 { background: rgba(243, 192, 141, .16); color: #f3c08d; box-shadow: inset 0 0 0 1px rgba(243, 192, 141, .35); }
.badge-activite-2 { background: rgba(110, 200, 160, .14); color: #8fd9b6; box-shadow: inset 0 0 0 1px rgba(110, 200, 160, .35); }
.badge-activite-bascule { cursor: pointer; user-select: none; }
/* Version nautique : houle et petit voilier sous le logo (glissement et rotation seulement, sans JavaScript). */
.badge-activite:has(+ .mer-menu) { margin-bottom: .35rem; }
.mer-menu { position: relative; height: 24px; margin: 0 -.75rem .85rem; overflow: hidden; pointer-events: none; }
.mer-vague { position: absolute; bottom: 0; left: 0; width: 200%; height: 12px; animation: mer-glisse 10s linear infinite; }
.mer-voilier { position: absolute; left: 132px; bottom: 6px; width: 20px; height: 20px; transform-origin: 50% 90%; animation: mer-tangue 3s ease-in-out infinite; }
@keyframes mer-glisse { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mer-tangue { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .mer-vague, .mer-voilier { animation: none; } }
/* Garage : route sous le logo, une voiture, une moto puis une mini-pelle passent à tour de rôle (18 s, 6 s chacun). */
.badge-activite:has(+ .route-menu) { margin-bottom: .35rem; }
.route-menu { position: relative; height: 28px; margin: 0 -.75rem .85rem; overflow: hidden; pointer-events: none; }
.route-chaussee { position: absolute; left: 0; right: 0; bottom: 2px; height: 10px; background: #0d1f31; border-top: 1px solid #2a4560; border-bottom: 1px solid #2a4560; }
.route-ligne { position: absolute; left: 0; bottom: 6px; width: 200%; height: 2px; background: repeating-linear-gradient(90deg, #f3c08d 0 10px, transparent 10px 20px); animation: route-defile 1.2s linear infinite; }
.route-vehicule { position: absolute; bottom: 7px; left: -40px; width: 30px; height: 18px; animation: route-traverse 18s linear infinite; }
.route-moto { animation-delay: 6s; }
.route-pelle { width: 32px; animation-delay: 12s; }
.route-roue { transform-box: fill-box; transform-origin: center; animation: route-tourne .6s linear infinite; }
.route-bras { transform-box: fill-box; transform-origin: 0% 50%; animation: route-creuse 1.4s ease-in-out infinite; }
@keyframes route-defile { from { transform: translateX(0); } to { transform: translateX(-20px); } }
@keyframes route-traverse { 0% { transform: translateX(0); } 33.3% { transform: translateX(300px); } 100% { transform: translateX(300px); } }
@keyframes route-tourne { to { transform: rotate(360deg); } }
@keyframes route-creuse { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) {
    .route-ligne, .route-vehicule, .route-roue, .route-bras { animation: none; }
    .route-voiture { left: 100px; } .route-moto, .route-pelle { display: none; }
}
/* Calumma (négoce) : caméléon sur sa branche, il change de couleur (24 s), roule l'œil et attrape une mouche toutes les 7 s. */
.badge-activite:has(+ .cameleon-menu) { margin-bottom: .35rem; }
.cameleon-menu { position: relative; height: 28px; margin: 0 -.75rem .85rem; overflow: hidden; pointer-events: none; }
.cameleon-branche { position: absolute; left: 0; bottom: 0; width: 100%; height: 28px; }
.cameleon { position: absolute; left: 84px; bottom: 5px; width: 72px; height: 24px; }
.cameleon-corps { fill: #6cc070; animation: cameleon-teinte 24s ease-in-out infinite; }
.cameleon-queue { stroke: #6cc070; animation: cameleon-teinte-trait 24s ease-in-out infinite; }
.cameleon-crete { stroke: rgba(13, 31, 49, .45); }
.cameleon-pupille { transform-box: view-box; animation: cameleon-oeil 7s ease-in-out infinite; }
.cameleon-langue { transform-box: fill-box; transform-origin: 0% 100%; transform: scaleX(0); animation: cameleon-langue 7s ease-out infinite; }
.cameleon-mouche { transform-box: fill-box; transform-origin: center; animation: cameleon-mouche 7s linear infinite; }
@keyframes cameleon-teinte { 0%, 100% { fill: #6cc070; } 25% { fill: #3fb7a4; } 50% { fill: #f3c08d; } 75% { fill: #4b9be3; } }
@keyframes cameleon-teinte-trait { 0%, 100% { stroke: #6cc070; } 25% { stroke: #3fb7a4; } 50% { stroke: #f3c08d; } 75% { stroke: #4b9be3; } }
@keyframes cameleon-oeil { 0%, 30% { transform: translate(0, 0); } 38%, 55% { transform: translate(-1.2px, -.6px); } 62%, 100% { transform: translate(.3px, -.2px); } }
@keyframes cameleon-langue { 0%, 78% { transform: scaleX(0); } 81% { transform: scaleX(1); } 86%, 100% { transform: scaleX(0); } }
@keyframes cameleon-mouche {
    0% { transform: translate(-3px, 2px); opacity: 1; } 20% { transform: translate(2px, -2px); } 40% { transform: translate(-2px, -3px); }
    60% { transform: translate(3px, 1px); } 79% { transform: translate(0, 0); opacity: 1; } 81%, 94% { transform: translate(-25px, 3px); opacity: 0; } 100% { transform: translate(-3px, 2px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .cameleon-corps, .cameleon-queue, .cameleon-pupille, .cameleon-langue, .cameleon-mouche { animation: none; } }
.marque span { color: var(--or); }
.menu-sections { flex: 1; display: flex; flex-direction: column; gap: .78rem; }
.menu-titre { margin: 0 0 .2rem; padding: 0 .65rem; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6f87a0; }
.menu-entree {
    display: flex; align-items: center; gap: .68rem; padding: .43rem .65rem; border-radius: 7px;
    color: var(--menu-texte); text-decoration: none; font-size: .9rem; line-height: 1.3; position: relative;
}
.menu-entree .icone { flex: none; opacity: .85; }
.menu-entree:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu-entree.actif { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.menu-entree.actif::before { content: ""; position: absolute; left: -.75rem; top: .4rem; bottom: .4rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--or); }
.menu-entree.actif .icone { opacity: 1; color: var(--or); }
/* Sections repliables du menu (Regis, 03/11/2026) : titre cliquable, nombre d'entrées, chevron ; section de la page en cours ouverte. */
.menu-sections:has(.menu-section-repliable) { gap: .15rem; }
.menu-section-repliable > summary { list-style: none; }
.menu-section-repliable > summary::-webkit-details-marker { display: none; }
.menu-section-repliable > .menu-titre {
    display: flex; align-items: center; gap: .4rem; margin: 0; padding: .42rem .65rem; border-radius: 6px; cursor: pointer; user-select: none;
}
.menu-section-repliable > .menu-titre:hover { background: rgba(255, 255, 255, .05); color: #a9bdd1; }
.menu-section-repliable > .menu-titre:focus-visible { outline: 2px solid #6fb0ea; outline-offset: -2px; }
.menu-section-repliable > .menu-titre::after {
    content: ""; width: 6px; height: 6px; margin: -2px .15rem 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg); transition: transform .15s ease;
}
.menu-section-repliable[open] > .menu-titre::after { transform: rotate(45deg); }
.menu-compte { margin-left: auto; font-weight: 500; letter-spacing: 0; color: #4f6880; font-variant-numeric: tabular-nums; }
.menu-section-repliable[open] > .menu-titre .menu-compte { visibility: hidden; }
.menu-section-repliable[open] { margin-bottom: .45rem; }
.menu-section-repliable:not([open]):has(.menu-entree.actif) > .menu-titre { color: #a9bdd1; }
@media (prefers-reduced-motion: reduce) { .menu-section-repliable > .menu-titre::after { transition: none; } }

.menu-utilisateur {
    display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .75rem .4rem 0;
    border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: #fff;
}
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--or); color: #5a3412; font-weight: 700; }
.menu-utilisateur-nom { flex: 1; min-width: 0; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.menu-utilisateur-nom small { display: block; color: var(--menu-texte); }
.menu-utilisateur form { margin: 0; }
.bouton-icone { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 0; background: transparent; color: var(--menu-texte); cursor: pointer; }
.bouton-icone:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.voile { display: none; }

@media (max-width: 900px) {
    body.avec-menu { padding-left: 0; }
    .barre-mobile {
        display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20;
        height: 52px; padding: 0 .75rem; background: var(--menu-fond);
    }
    .bouton-menu { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; cursor: pointer; border-radius: 7px; margin: 0; }
    .menu-lateral { transform: translateX(-100%); transition: transform .2s ease; }
    .menu-bascule:checked ~ .menu-lateral { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .menu-bascule:checked ~ .voile { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(10, 20, 30, .45); margin: 0; }
}

/* ------------------------------------------------------------------
   Tableau de bord
   ------------------------------------------------------------------ */
.accueil-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.accueil-entete h1 { font-size: 1.6rem; margin: 0; }
.accueil-date { margin: 0; color: var(--discret); font-size: .9rem; }
.accueil-role { margin: 0; font-size: .875rem; }

.tuiles-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tuile-stat {
    --accent: var(--bleu-action); --accent-fond: #e8f0fe;
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icone libelle" "valeur valeur" "detail detail";
    align-items: center; gap: .35rem .7rem; padding: 1rem 1.1rem 1.05rem;
    background: var(--surface); border: 1px solid #dfe5ec; border-radius: 12px; text-decoration: none; color: var(--texte);
    box-shadow: 0 1px 2px rgba(20, 44, 68, .04); transition: border-color .15s, box-shadow .15s, transform .15s;
    position: relative; overflow: hidden;
}
.tuile-stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.tuile-stat:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(20, 44, 68, .08); transform: translateY(-1px); }
.tuile-icone { grid-area: icone; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-fond); color: var(--accent); }
.tuile-libelle { grid-area: libelle; font-size: .9rem; font-weight: 500; color: #3b4754; }
.tuile-valeur { grid-area: valeur; font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.tuile-detail { grid-area: detail; font-size: .8rem; color: var(--discret); }
.tuile-or { --accent: #c9762c; --accent-fond: #fdf0e3; }
.tuile-a-facturer { --accent: #1e7a46; --accent-fond: #e6f4ec; }
.tuile-devis { --accent: #23739a; --accent-fond: #e6f3f9; }
.tuile-commandes { --accent: #6a4bc4; --accent-fond: #f0ebfd; }
.tuile-retard { --accent: #c0362c; --accent-fond: #fdeceb; }
.tuile-a-venir .tuile-valeur { color: #b3bec9; }

.panneau { background: var(--surface); border: 1px solid #dfe5ec; border-radius: 12px; box-shadow: 0 1px 2px rgba(20, 44, 68, .04); overflow: hidden; }
.panneau-entete { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; padding: 1rem 1.1rem; border-bottom: 1px solid #edf0f4; }
.panneau-entete h2 { margin: 0; font-size: 1rem; }
.badges-etats { display: flex; gap: .4rem; flex-wrap: wrap; }
.tableau-sans-bord { border: 0; border-radius: 0; }
.tableau-or th { background: #f6f8fb; color: var(--discret); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.tableau-or td { padding: .65rem .7rem; }
.tableau-or td:first-child, .tableau-or th:first-child { padding-left: 1.1rem; }
.tableau-or td:last-child, .tableau-or th:last-child { padding-right: 1.1rem; }
.numero-or { font-weight: 600; font-variant-numeric: tabular-nums; border-left: 3px solid var(--or); }
.en-retard { color: var(--erreur); font-weight: 600; }

.badge-etat { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.badge-etat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-etat strong { font-weight: 700; }
.badge-etat-en-cours { background: #e8f0fe; color: #1857c0; }
.badge-etat-a-facturer { background: #fdf3dc; color: #946200; }
.badge-etat-complementaires { background: #f0ebfd; color: #5a3fb0; }
.badge-etat-facture { background: #e6f4ec; color: #1e7a46; }
.badge-etat-annule { background: #eef1f4; color: #66727f; }
.badge-etat-accepte { background: #e6f4ec; color: #1e7a46; }
.badge-etat-expire { background: #fdeceb; color: #b3261e; }
@media (max-width: 560px) {
    .tuiles-stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .tuile-stat { padding: .8rem; gap: .3rem .5rem; }
    .tuile-valeur { font-size: 1.6rem; }
    .tuile-icone { width: 30px; height: 30px; }
    .tuile-libelle { font-size: .8rem; }
}

/* ------------------------------------------------------------------
   Logo et charte (bleu #2474BC, gris #666767 ; nom du logo en Montserrat)
   ------------------------------------------------------------------ */
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo img { display: block; }
.logo-texte { font-family: "Montserrat", sans-serif; font-size: 1.35rem; letter-spacing: -.01em; line-height: 1; }
.logo-meca { font-weight: 700; color: var(--marque-bleu); }
.logo-logic { font-weight: 500; color: var(--marque-gris); }
.logo-sombre .logo-meca { color: #4b9be3; }
.logo-sombre .logo-logic { color: #fff; }
/* Mention de série sous le nom (Calumma, Regis 03/11/2026) : capitales justifiées sur la largeur de « mecalogic »,
   le C part du jambage du m et le A finit sur le c (approches de Montserrat compensées). Le nom garde sa place :
   l'icône reste en haut, le nom descend de l'écart qu'il avait quand il était centré sur l'icône. */
.logo-avec-serie { align-items: flex-start; }
.logo-avec-serie .logo-texte { display: inline-flex; flex-direction: column; margin-top: .19em; }
.logo-serie { display: flex; justify-content: space-between; margin-top: .444em; padding: 0 .111em 0 .278em;
    font-size: .4167em; font-weight: 500; letter-spacing: 0; line-height: 1; color: var(--marque-gris); }
.logo-sombre .logo-serie { color: #b9c8d8; }
a.marque { display: block; }
.menu-lateral a.marque { padding: 0 .4rem; margin-bottom: 1.4rem; }
.barre-mobile .logo-texte { font-size: 1.15rem; }
.menu-entree.actif::before { background: var(--marque-bleu); }
.menu-entree.actif .icone { color: #6fb0ea; }
.avatar { background: var(--marque-bleu); color: #fff; }
h1, h2, .tuile-valeur, .fiche-entete h1 { letter-spacing: -.01em; }
.connexion .logo { margin-bottom: .5rem; }
.connexion .logo-texte { font-size: 1.7rem; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------
   Fiches, version 2 — d'après la maquette « Fiche moteur » de Regis :
   cartes arrondies, champs plus hauts, pastilles pour les cases,
   Bâbord en rouge / Tribord en vert, références système verrouillées,
   onglets Observations / Documentation en bas de fiche.
   ------------------------------------------------------------------ */
.fiche-entete, .bloc, .onglets {
    border: 1px solid #e3e7ec; border-radius: 12px; box-shadow: 0 1px 2px rgba(20, 44, 68, .04);
}
.fiche-entete { padding: 1rem 1.5rem; }
.fiche-entete h1 { font-size: 1.05rem; font-weight: 700; }
.bloc { padding: 1.25rem 1.5rem 1.4rem; }
.bloc-titre { font-size: .74rem; font-weight: 700; letter-spacing: .05em; color: #374151; margin-bottom: 1rem; display: flex; align-items: center; gap: .4rem; }
.bloc-outils { top: .9rem; right: 1.25rem; }
.grille { gap: .85rem 1.25rem; }
.champ label { font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; }

.fiche input[type=text], .fiche input[type=email], .fiche input[type=tel], .fiche input[type=number],
.fiche input[type=date], .fiche input[type=datetime-local], .fiche select, .fiche textarea,
.onglets input[type=text], .onglets select, .onglets textarea {
    min-height: 38px; padding: .45rem .75rem; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 7px; background: #fff;
    font-family: inherit; color: var(--texte); width: 100%;
}
.fiche input.nombre { text-align: left; }
.fiche select, .onglets select { appearance: none; padding-right: 2.2rem; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666767' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center; }
.fiche input::placeholder, .fiche textarea::placeholder { color: #b0b8c1; }

/* Ligne « champ + bouton » (ex. Marque [+]) */
.champ-avec-bouton { display: flex; gap: .6rem; align-items: flex-end; }
.champ-avec-bouton .champ { flex: 1; }
.bouton-carre { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d6dce3; border-radius: 7px; background: #fff; color: #4b5563; text-decoration: none; }
.bouton-carre:hover { border-color: var(--bleu-action); color: var(--bleu-action); }

/* Cases en pastilles (Actif, Sous garantie…) */
.pastilles { display: flex; gap: .6rem; flex-wrap: wrap; grid-column: 1 / -1; margin-bottom: .2rem; }
.case-pastille { display: inline-flex; align-items: center; gap: .55rem; margin: 0; padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
    border: 1px solid #bcd4f2; background: #eaf2fc; color: var(--bleu-action); font-size: .875rem; font-weight: 500; user-select: none; }
.case-pastille input { margin: 0; accent-color: var(--bleu-action); background: #fff; }
.case-pastille:has(input:checked) { background: var(--bleu-action); border-color: var(--bleu-action); color: #fff; }
.case-pastille:has(input:checked) input { accent-color: #fff; }
.case-pastille:has(input:focus-visible) { outline: 2px solid var(--bleu-action); outline-offset: 2px; }
fieldset:disabled .case-pastille { cursor: default; opacity: .85; }

/* Bâbord (rouge) / Tribord (vert), convention des feux de navigation */
select.emplacement:has(option:checked[data-cote=babord]) { color: #b42318; font-weight: 600; }
select.emplacement:has(option:checked[data-cote=tribord]) { color: #1e7a46; font-weight: 600; }
.cote-babord { color: #b42318; font-weight: 600; }
.cote-tribord { color: #1e7a46; font-weight: 600; }

/* Références système (lecture seule) */
.bloc-systeme input { background: #f3f5f8 !important; color: var(--discret) !important; }
.bloc-systeme .bloc-titre .icone { color: var(--discret); }

/* Résumé d'un élément lié (ex. transmission sur la fiche moteur) */
.resume { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1.25rem; grid-column: 1 / -1; }
.resume dt { font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; }
.resume dd { margin: 0; min-height: 38px; padding: .5rem .75rem; border: 1px dashed #d6dce3; border-radius: 7px; font-size: .9rem; color: var(--texte); background: #fafbfc; }
.resume dd:empty::before { content: "—"; color: #b0b8c1; }
.lien-fleche { display: inline-flex; align-items: center; gap: .3rem; font-size: .875rem; }

/* Onglets (bas de fiche) — sans JavaScript, par boutons radio */
.onglets { background: var(--surface); overflow: hidden; }
.onglets > input { position: absolute; opacity: 0; pointer-events: none; }
.onglets-titres { display: flex; gap: .25rem; padding: 0 1.25rem; border-bottom: 1px solid #e3e7ec; }
.onglets-titres label { margin: 0; padding: .9rem 1.1rem .8rem; font-size: .9rem; font-weight: 500; color: var(--discret); cursor: pointer; border-bottom: 2px solid transparent; }
.onglets-titres label:hover { color: var(--texte); }
.onglet-panneau { display: none; padding: 1.25rem 1.5rem 1.5rem; }
#onglet-1:checked ~ .onglets-titres label[for=onglet-1], #onglet-2:checked ~ .onglets-titres label[for=onglet-2] { color: var(--texte); border-bottom-color: var(--bleu-action); font-weight: 600; }
#onglet-1:checked ~ .onglet-1, #onglet-2:checked ~ .onglet-2 { display: block; }
#onglet-1:focus-visible ~ .onglets-titres label[for=onglet-1], #onglet-2:focus-visible ~ .onglets-titres label[for=onglet-2] { outline: 2px solid var(--bleu-action); outline-offset: -2px; }

/* Documents liés */
.documents-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.documents-entete h3 { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #374151; }
.ajout-document[open] > form { display: flex; }
.ajout-document > summary { list-style: none; }
.ajout-document > summary::-webkit-details-marker { display: none; }
.ajout-document > form { display: none; gap: .75rem; align-items: flex-end; flex-wrap: wrap; padding: 1rem; margin-bottom: 1rem; border: 1px dashed #bcd4f2; border-radius: 10px; background: #f7fafe; }
.ajout-document .champ { min-width: 200px; flex: 1; }
.ajout-document input[type=file] { font: inherit; font-size: .875rem; }
.tableau-documents th { background: transparent; color: var(--discret); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid #e3e7ec; padding-left: .6rem; }
.tableau-documents td { padding: .7rem .6rem; }
.doc-nom { display: inline-flex; align-items: center; gap: .55rem; color: var(--texte) !important; font-weight: 500; }
.doc-nom .icone { color: #d92d20; flex: none; }
.categorie { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 500; background: #e8f0fe; color: #1857c0; }
.actions { display: flex; gap: .2rem; justify-content: flex-end; }
.actions form { margin: 0; }
.action { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 0; background: transparent; color: #4b5563; cursor: pointer; text-decoration: none; }
.action:hover { background: #f1f4f8; color: var(--texte); }
.action-supprimer { color: #d92d20; }
.action-supprimer:hover { background: #fdecec; color: #b42318; }
.bouton-secondaire .icone { margin-right: .35rem; }
.onglets { margin-top: 1rem; }
.onglets textarea { min-height: 140px; }
.onglets-titres .pastille { margin-left: .35rem; background: #e8f0fe; color: #1857c0; }
.onglets .ajout-document form .champ label { font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; }
.badge-echeance-depasse { background: #fdecec; color: #b42318; margin-left: .35rem; }
.badge-echeance-proche { background: #fdf3dc; color: #946200; margin-left: .35rem; }
.onglet-panneau { position: relative; }
.ajout-document > summary { position: absolute; top: 1.05rem; right: 1.5rem; margin: 0 !important; }
.ajout-document[open] > form { margin-top: .2rem; }
@media (max-width: 560px) { .ajout-document > summary { position: static; margin-bottom: .9rem !important; } }
/* Listes au même style que le tableau de bord */
.tableau-cadre { border-color: #e3e7ec; border-radius: 12px; box-shadow: 0 1px 2px rgba(20, 44, 68, .04); }
.bloc .tableau-cadre { box-shadow: none; border-radius: 8px; }
.tableau th { background: #f6f8fb; color: var(--discret); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: .6rem .8rem; }
.tableau td { padding: .6rem .8rem; }

/* Bloc Documents (sous la fiche) et résumé de la transmission sur la fiche moteur */
.bloc-documents { margin-top: 1rem; }
.bloc-documents select, .familles-defaut select { min-height: 38px; padding: .45rem 2.2rem .45rem .75rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 7px; width: 100%; appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666767' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center; }
.bloc-documents .ajout-document form .champ label { font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; }
.bloc-documents .documents-entete h3 { color: var(--discret); font-weight: 600; }
.resume-ligne { margin: 0; padding: .55rem .75rem; border-radius: 7px; background: #f6f8fb; font-size: .875rem; color: #3b4754; }
.bloc-documents .documents-entete h3 { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 500; margin-top: -.4rem; }

/* ------------------------------------------------------------------
   Ordres de réparation — accent orange #F3C08D (charte MecaLogic)
   ------------------------------------------------------------------ */
:root { --or-fond: #fdf3e8; --or-bordure: #f3c08d; --or-fonce: #b4651d; --or-texte: #6b3a0f; --or-survol: #eeae6f; --or-nomenclature: #fde7d1; --or-nomenclature-survol: #fbdcbd; }
/* Documents commerciaux (socle commun) : les classes or-* font la mise en page de tout document ;
   la couleur vient des variables --or*, redéfinies par thème (Regis, 01/11/2026). */
.theme-devis { --or: #A8D4E8; --or-fond: #eef7fb; --or-bordure: #a8d4e8; --or-fonce: #23739a; --or-texte: #0f3d55; --or-survol: #8fc6de; --or-nomenclature: #dcedf6; --or-nomenclature-survol: #cbe4f1; }
.theme-commande { --or: #B7DCAE; --or-fond: #f0f8ee; --or-bordure: #b7dcae; --or-fonce: #3f7d34; --or-texte: #1f4a19; --or-survol: #a2d097; --or-nomenclature: #e2f1de; --or-nomenclature-survol: #d3e9cd; }
.bouton-or { background: var(--or); border-color: var(--or); color: var(--or-texte); font-weight: 600; }
.bouton-or:hover { background: var(--or-survol); border-color: var(--or-survol); color: var(--or-texte); }
.filtres-etat { display: flex; gap: .4rem; flex-wrap: wrap; margin: -.25rem 0 1rem; }
.filtre { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid #e3e7ec; background: #fff; color: #3b4754; text-decoration: none; font-size: .85rem; font-weight: 500; }
.filtre span { font-size: .75rem; color: var(--discret); font-variant-numeric: tabular-nums; }
.filtre:hover { border-color: var(--or-bordure); }
.filtre.actif { background: var(--or-fond); border-color: var(--or-bordure); color: var(--or-texte); }
.filtre.actif span { color: var(--or-fonce); }
.numero-or a { color: var(--texte) !important; }

/* Fiche OR */
.or-entete { background: var(--surface); border: 1px solid #e3e7ec; border-top: 3px solid var(--or); border-radius: 12px; box-shadow: 0 1px 2px rgba(20,44,68,.04); margin-bottom: 1rem; }
.or-entete-ligne { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem .75rem; flex-wrap: wrap; }
.or-icone { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--or); color: var(--or-texte); flex: none; }
.or-titre { flex: 1; min-width: 220px; }
.or-titre h1 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.or-titre p { margin: .15rem 0 0; color: var(--discret); font-size: .85rem; }
.or-onglets { display: flex; gap: 1.5rem; padding: 0 1.25rem; border-top: 1px solid #eef1f4; }
.or-onglets > span { padding: .7rem 0 .6rem; font-size: .875rem; font-weight: 500; color: var(--discret); border-bottom: 2px solid transparent; }
.or-onglets > .actif { color: var(--texte); font-weight: 600; border-bottom-color: var(--or); }
.or-onglets > .a-venir { opacity: .6; cursor: not-allowed; }
.message-info { background: var(--or-fond); color: var(--or-texte); border: 1px solid var(--or-bordure); margin-bottom: 1rem; }
#fiche-or > .message { margin-bottom: 1rem; }

.or-haut { display: grid; grid-template-columns: 1fr 1fr minmax(260px, .8fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.25rem; margin: 0; }
.infos .large { grid-column: 1 / -1; }
.infos dt { font-size: .78rem; color: var(--discret); margin-bottom: .15rem; }
.infos dd { margin: 0; min-height: 1.4em; font-size: .9rem; font-weight: 500; }
.infos dd:empty::before { content: "—"; color: #b0b8c1; font-weight: 400; }
.infos a { color: var(--primaire); text-decoration: none; }
.bloc-document fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bloc-document { border-color: #e3e7ec; }
select.etat-or { font-weight: 600; }
select.etat-en-cours { background-color: #eef4fe; color: #1857c0; }
select.etat-a-facturer { background-color: #fdf3dc; color: #946200; }
select.etat-complementaires { background-color: #f3effd; color: #5a3fb0; }
select.etat-facture { background-color: #e9f6ef; color: #1e7a46; }
select.etat-annule { background-color: #f1f3f5; color: #66727f; }
select.etat-accepte { background-color: #e9f6ef; color: #1e7a46; }

.or-bas { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.bloc-lignes { padding: 0; overflow: visible; }
.lignes-entete { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .6rem 1rem; border-bottom: 1px solid #eef1f4; }
.onglets-simples { display: flex; gap: .25rem; }
.onglets-simples button { border: 0; background: none; font: inherit; font-size: .875rem; font-weight: 500; color: var(--discret); padding: .55rem .75rem; border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.onglets-simples button.actif { color: var(--texte); font-weight: 600; border-bottom-color: var(--or); }
.pastille-or { background: var(--or-fond); color: var(--or-fonce); }
.barre-outils { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.barre-outils .bouton-petit { min-width: 0; gap: .2rem; }
.recherche-article { position: relative; }
.recherche-article input { width: 290px; max-width: 70vw; padding: .4rem .7rem; font: inherit; font-size: .85rem; border: 1px solid #d6dce3; border-radius: 7px; }
.resultats-article { position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; width: 420px; max-width: 90vw; margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid #e3e7ec; border-radius: 10px; box-shadow: 0 10px 30px rgba(20,44,68,.15); }
.resultats-article button { display: flex; gap: .6rem; align-items: baseline; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .6rem; border-radius: 7px; font: inherit; font-size: .85rem; cursor: pointer; }
.resultats-article button:hover, .resultats-article button:focus { background: var(--or-fond); }
.resultats-article .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--discret); }
.resultats-article .prix { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--discret); white-space: nowrap; }
.resultats-article .aucun { padding: .6rem; color: var(--discret); font-size: .85rem; }
.aide-selection { margin: 0; padding: .45rem 1rem; font-size: .8rem; background: var(--or-fond); color: var(--or-texte); }
.lien-bouton { border: 0; background: none; padding: 0; font: inherit; color: var(--primaire); text-decoration: underline; cursor: pointer; }

.tableau-lignes th { font-size: .72rem; }
.tableau-lignes td { padding: .3rem .45rem; vertical-align: middle; }
.tableau-lignes td:first-child, .tableau-lignes th:first-child { padding-left: 1rem; }
.tableau-lignes input[type=text], .tableau-lignes select.mini {
    width: 100%; min-width: 0; padding: .3rem .45rem; font: inherit; font-size: .85rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--texte); }
.tableau-lignes input[type=text]:hover, .tableau-lignes select.mini:hover { border-color: #d6dce3; background: #fff; }
.tableau-lignes input[type=text]:focus, .tableau-lignes select.mini:focus { border-color: var(--bleu-action); background: #fff; outline: none; }
.tableau-lignes input.nombre { text-align: right; width: 5.5rem; }
.tableau-lignes .col-ref { width: 9rem; } .tableau-lignes .col-ref input, .tableau-lignes .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.tableau-lignes .col-tva { width: 5.5rem; } .tableau-lignes .col-etat { width: 7.5rem; } .tableau-lignes .col-type { width: 7rem; }
.tableau-lignes .col-actions .actions { gap: 0; } .tableau-lignes .action { width: 28px; height: 28px; font-size: .9rem; }
.designation { display: flex; align-items: center; gap: .35rem; }
.retrait { color: var(--or-fonce); padding-left: .4rem; }
.gras { font-weight: 600; }
.total { font-weight: 600; font-variant-numeric: tabular-nums; }
.type-ligne { border: 0; background: none; padding: 0; cursor: pointer; }
.badge-type { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 500; background: #eef1f4; color: #3b4754; }
.badge-nomenclature { background: var(--or); color: var(--or-texte); }
.ligne-nomenclature { background: var(--or-nomenclature); }
.ligne-nomenclature:hover { background: var(--or-nomenclature-survol) !important; }
.ligne-enfant { background: #fffaf4; }
.ligne-selection { outline: 1px solid var(--or-fonce); outline-offset: -1px; }
.ligne-exclue .total, .ligne-exclue .nombre { color: #a0aab4; }
.ligne-exclue .total { text-decoration: line-through; text-decoration-color: #c7ced6; }
.ligne-nomenclature select.mini { margin-top: .15rem; font-size: .75rem; color: var(--or-texte); }
select.statut, span.statut { font-weight: 500; }
.statut-0 { color: #66727f; } .statut-1 { color: #1857c0; } .statut-2 { color: #b42318; } .statut-3 { color: #1e7a46; } .statut-4 { color: #9aa3ad; text-decoration: line-through; }
.observations-or { padding: 1rem; }
.observations-or textarea { width: 100%; padding: .55rem .75rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 7px; }

.bloc-totaux { position: sticky; top: 1rem; }
.totaux { margin: 0; display: grid; gap: .55rem; }
.totaux > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.totaux dt { color: #3b4754; } .totaux dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.totaux .detail { font-size: .8rem; } .totaux .detail dt, .totaux .detail dd { color: var(--discret); font-weight: 400; }
.totaux .ttc { border-top: 1px solid #e3e7ec; padding-top: .6rem; font-size: 1rem; } .totaux .ttc dt { font-weight: 700; color: var(--texte); } .totaux .ttc dd { font-weight: 700; }
.reste { margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; background: var(--or-fond); border: 1px solid var(--or-bordure); display: grid; gap: .2rem; }
.reste span { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--or-fonce); }
.reste strong { font-size: 1.6rem; color: var(--or-texte); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) { .or-haut { grid-template-columns: 1fr 1fr; } .bloc-document { grid-column: 1 / -1; } .or-bas { grid-template-columns: 1fr; } .bloc-totaux { position: static; } }
@media (max-width: 700px) { .or-haut { grid-template-columns: 1fr; } }
.tableau-lignes { table-layout: fixed; min-width: 860px; font-size: .84rem; }
.tableau-lignes .c-type { width: 4.8rem; } .tableau-lignes .c-ref { width: 7.5rem; } .tableau-lignes .c-desc { width: auto; }
.tableau-lignes .c-qte { width: 4.2rem; } .tableau-lignes .c-prix { width: 5rem; } .tableau-lignes .c-total { width: 5.4rem; }
.tableau-lignes .c-tva { width: 4.9rem; } .tableau-lignes .c-etat { width: 7rem; } .tableau-lignes .c-actions { width: 4.8rem; }
.tableau-lignes .c-famille { width: 3rem; text-align: center; } .tableau-lignes .col-famille { text-align: center; color: var(--discret); font-size: .8rem; font-variant-numeric: tabular-nums; }
.tableau-lignes input.nombre { width: 100%; }
.tableau-lignes .col-tva, .tableau-lignes .col-etat, .tableau-lignes .col-type { width: auto; }
.tableau-lignes select.mini { padding-right: 1.4rem; appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666767' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .4rem center; }
.tableau-lignes select.mini:hover, .tableau-lignes select.mini:focus { background-color: #fff; }
.or-bas .tableau-cadre { overflow-x: auto; }
.liste-cases { display: grid; gap: .35rem; }
.liste-cases .case { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid #e3e7ec; border-radius: 8px; margin: 0; font-size: .875rem; cursor: pointer; }
.liste-cases .case:has(input:checked) { border-color: #bcd4f2; background: #f4f8fd; }
.liste-cases .case > span { flex: 1; }
.lien-discret { font-size: .78rem; color: var(--discret) !important; }
/* Version de l'application, très discrète */
.version { margin: .5rem 0 0; font-size: .6rem; color: #b3bcc6; letter-spacing: .02em; cursor: default; }
.version-connexion { text-align: center; margin-top: 1.25rem; }
.version-accueil { display: block; text-align: right; font-size: .6rem; color: #b3bcc6; margin-top: .2rem; letter-spacing: .02em; }

/* Fiche OR v2 : deux colonnes indépendantes (principal | côté), sans zones vides */
.or-message { margin: 0 0 1rem; }
.or-page { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.25rem; align-items: start; }
.or-principal, .or-cote { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.or-infos { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.or-infos-partie { padding: 1.1rem 1.4rem 1.2rem; min-width: 0; }
.or-infos-partie + .or-infos-partie { border-left: 1px solid #eef1f4; }
.or-infos .bloc-titre { margin-bottom: .55rem; }
.or-infos-nom { margin: 0 0 .7rem; font-size: 1rem; font-weight: 600; }
.or-infos-nom a { color: var(--primaire); text-decoration: none; }
.or-infos-nom a:hover { text-decoration: underline; }
.or-infos-vide { margin: 0; }
.infos-compactes { gap: .5rem 1.25rem; }
.infos-compactes dt { font-size: .74rem; }
.infos-compactes dd { font-size: .875rem; }
.or-cote .bloc-totaux { position: static; }
.or-cote .bloc-document fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* Colonne de droite plus étroite : champs resserrés pour que les dates restent lisibles. */
.or-cote .bloc-document .grille-2 { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); column-gap: .75rem; }
/* Libellés sur une seule ligne : les champs d'une même rangée restent alignés. */
.or-cote .bloc-document .champ label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-cote .bloc-document input, .or-cote .bloc-document select { padding-left: .55rem; padding-right: .45rem; font-size: .875rem; }
@media (max-width: 1100px) { .or-page { grid-template-columns: 1fr; } .or-cote { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } }
@media (max-width: 700px) { .or-infos { grid-template-columns: 1fr; } .or-infos-partie + .or-infos-partie { border-left: 0; border-top: 1px solid #eef1f4; } .or-cote { grid-template-columns: 1fr; } }

/* Zones repliables (fiche OR) — ouvertes par défaut */
.repliable > summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; }
.repliable > summary::-webkit-details-marker { display: none; }
.repliable > summary::marker { content: ""; }
.repliable > summary .bloc-titre { margin: 0; }
.repliable > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #8a96a3; border-bottom: 2px solid #8a96a3; transform: rotate(45deg); transition: transform .15s; flex: none; }
.repliable:not([open]) > summary::after { transform: rotate(-45deg); }
.repliable > summary:hover::after { border-color: var(--texte); }
.repliable > summary:focus-visible { outline: 2px solid var(--bleu-action); outline-offset: 4px; border-radius: 4px; }
.repliable[open] > summary { margin-bottom: .9rem; }
.resume-replie { display: none; font-size: .85rem; color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.repliable:not([open]) .resume-replie { display: inline; }
.bloc-lignes > summary { padding: .9rem 1rem; margin: 0 !important; }
.bloc-lignes[open] > summary { border-bottom: 1px solid #eef1f4; }
.or-infos-carte { padding: 1.1rem 1.4rem 1.2rem; }
.or-infos-carte .or-infos { padding: 0; }
.or-infos-carte .or-infos-partie { padding: 0 1.4rem 0 0; }
.or-infos-carte .or-infos-partie + .or-infos-partie { padding: 0 0 0 1.4rem; }
.or-infos-carte .or-infos-partie .bloc-titre { font-size: .7rem; color: var(--discret); }
.fiche-document { margin: 0; }
@media (max-width: 700px) { .or-infos-carte .or-infos-partie, .or-infos-carte .or-infos-partie + .or-infos-partie { padding: .8rem 0 0; } }

/* Bateau et client : version compacte (nom sur la ligne du titre, infos sur une ligne) */
.or-infos-carte { padding: .8rem 1.25rem .85rem; }
.or-infos-carte[open] > summary { margin-bottom: .6rem; }
/* Libellé (BATEAU, CLIENT) et nom alignés sur la même ligne de base ; l'icône est posée à part. */
.or-infos-entete { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .45rem; min-width: 0; }
.or-infos-entete .bloc-titre { display: inline-block; margin: 0; flex: none; }
.or-infos-entete .bloc-titre svg { vertical-align: -2px; margin-right: .35rem; }
.or-infos-entete .or-infos-nom { margin: 0; font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infos-compactes { gap: .2rem 1rem; }
.infos-compactes dt { font-size: .7rem; margin-bottom: 0; }
.infos-compactes dd { font-size: .85rem; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infos-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.infos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1300px) { .infos-4, .infos-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Zones de l'OR : même marge à droite partout, pour que les flèches de repli soient alignées */
.or-page .repliable { padding-left: 1.25rem; padding-right: 1.25rem; }
.or-page .bloc-lignes { padding: 0; }
.or-page .bloc-lignes > summary { padding: .9rem 1.25rem; }
.or-page .repliable > summary { min-height: 1.5rem; }

/* Boutons d'action de l'OR (imprimer, PDF, dupliquer) */
.or-outils { display: flex; align-items: center; gap: .15rem; padding-right: .75rem; margin-right: .25rem; border-right: 1px solid #e3e7ec; }
.or-outils form { margin: 0; }
.bouton-outil { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border: 0; border-radius: 8px;
    background: none; color: #4b5560; font: inherit; font-size: .85rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.bouton-outil:hover { background: #f1f4f7; color: var(--texte); }
.bouton-outil:focus-visible { outline: 2px solid var(--bleu-action); outline-offset: 1px; }
@media (max-width: 1100px) { .bouton-outil span { display: none; } }

/* Administration : aperçu du logo */
.apercu-logo { padding: .75rem; border: 1px dashed #c9d1da; border-radius: 8px; text-align: center; background: #fafbfc; }
.apercu-logo img { max-width: 100%; max-height: 90px; }

/* Barre d'ajout de l'OR : résultats par catalogue, ligne libre, boutons de mode */
.resultats-article { width: 520px; max-height: 420px; overflow-y: auto; }
.resultats-article ul { list-style: none; margin: 0; padding: 0; }
.resultats-groupe { margin: .4rem .6rem .15rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--discret); }
.resultats-article button { align-items: center; }
.resultats-article .badge-type { flex: none; min-width: 4.6rem; text-align: center; }
.resultats-article .ref { flex: none; min-width: 6.5rem; }
.resultats-article .libelle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resultats-article .ligne-libre { margin-top: .25rem; border-top: 1px solid #eef1f4; border-radius: 0 0 7px 7px; color: var(--primaire); font-weight: 500; }
.barre-outils .bouton-petit.actif { background: var(--or-fond); border-color: var(--or-bordure); color: var(--or-texte); }

/* Ligne de texte libre */
.tableau-lignes tr.ligne-texte textarea { width: 100%; min-height: 2rem; resize: none; overflow: hidden; font: inherit; font-size: .875rem;
    font-style: italic; color: #4b5560; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: .35rem .5rem; line-height: 1.4; }
.tableau-lignes tr.ligne-texte textarea:hover { border-color: #e3e7ec; }
.tableau-lignes tr.ligne-texte textarea:focus { border-color: var(--bleu-action); background: #fff; outline: none; font-style: normal; }
.texte-libre { font-style: italic; color: #4b5560; }
.colonne-large { grid-column: 1 / -1; }

/* Catalogue */
.bloc-lignes-nomenclature { padding: 0; margin-top: 1.5rem; }
.bloc-lignes-nomenclature .lignes-entete { padding: .9rem 1.25rem; }
.bloc-lignes-nomenclature .lignes-entete .bloc-titre { margin: 0; }
.tableau-lignes td.barre { text-decoration: line-through; color: var(--discret); }
.tableau-lignes tfoot td { padding: .8rem .75rem; font-weight: 600; border-top: 1px solid #e3e7ec; }
.ref-catalogue a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.lien-texte { color: inherit; text-decoration: none; }
.lien-texte:hover { text-decoration: underline; }
tr.ligne-desuete td { color: var(--discret); }
.stock-alerte { color: #b42318; font-weight: 600; }
.bloc-lignes-nomenclature .c-unite { width: 80px; }
.bloc-lignes-nomenclature .c-ref { width: 140px; }

/* Verrous posés par l'atelier (onglet Contenu) */
.verrou { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; cursor: help; }
.tableau-lignes .action.verrou { width: 28px; height: 28px; }
.verrou-travaux { color: #2474bc; }
.verrou-termine { color: #1e7a46; background: #e6f4ec; }
.legende-verrous { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0; padding: .7rem 1rem; font-size: .8rem; color: #4b5560; border-top: 1px solid #eef1f4; }
.legende-verrous > span { display: inline-flex; align-items: center; gap: .4rem; }
.legende-verrous .verrou { width: 22px; height: 22px; }
.tableau-lignes input[readonly] { color: var(--discret); cursor: not-allowed; }

/* Onglets de l'OR */
.or-onglets a { padding: .7rem 0 .6rem; font-size: .875rem; font-weight: 500; color: var(--discret); border-bottom: 2px solid transparent; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.or-onglets a:hover { color: var(--texte); }
.or-onglets a.actif { color: var(--texte); font-weight: 600; border-bottom-color: var(--or); }
.pastille-atelier { font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #e8f0fb; color: #1857c0; }
.pastille-atelier.complet { background: #e6f4ec; color: #1e7a46; }

/* Onglet Atelier */
.or-atelier .lignes-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.25rem; }
.or-atelier .lignes-entete .bloc-titre { margin: 0; }
.filtres-atelier { margin: 0; }
.filtres-atelier .filtre { font: inherit; font-size: .8rem; cursor: pointer; }
.tableau-atelier { min-width: 820px; }
.tableau-pointages { min-width: 640px; table-layout: auto; }
.tableau-atelier .c-compagnon { width: 8.5rem; } .tableau-atelier .c-temps { width: 6.5rem; } .tableau-atelier .c-date { width: 8.4rem; }
.tableau-atelier tr.cliquable { cursor: pointer; }
.tableau-atelier tr.cliquable:hover td { background: #f6f9fc; }
.tableau-atelier tr.ligne-selection td { background: #eaf2fc !important; }
.tableau-atelier .designation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-date { width: 100%; font: inherit; font-size: .8rem; padding: .25rem .35rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--texte); }
.mini-date:hover { border-color: #d6dce3; background: #fff; }
.mini-date:focus { border-color: var(--bleu-action); background: #fff; outline: none; }
.temps { display: block; font-variant-numeric: tabular-nums; font-size: .8rem; }
.jauge { display: block; height: 4px; border-radius: 3px; background: #e8ecf0; overflow: hidden; margin-top: .25rem; }
.jauge > span { display: block; height: 100%; background: var(--bleu-action); border-radius: 3px; }
.jauge > span.depasse { background: #d97706; }
.jauge-large { height: 7px; margin: .5rem 0 1.1rem; }
.jauge-large > span { background: #1e7a46; }
.pastille-compagnon { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 999px; background: var(--or-fond); color: var(--or-texte); font-size: .68rem; font-weight: 700; }
.compagnon { display: inline-flex; align-items: center; gap: .4rem; }
.puce-statut { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 500; background: #f1f4f7; color: #66727f; }
.puce-statut::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.puce-statut-1 { background: #e8f0fb; color: #1857c0; } .puce-statut-2 { background: #fdecea; color: #b42318; }
.puce-statut-3 { background: #e6f4ec; color: #1e7a46; } .puce-statut-4 { background: #f1f4f7; color: #9aa3ad; text-decoration: line-through; }
.pointages-ligne { margin: .3rem 0 0; font-weight: 600; font-size: .95rem; }
.saisie-pointage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem 1rem; padding: 1rem 1.25rem; background: #fbfcfd; border-top: 1px solid #eef1f4; border-bottom: 1px solid #eef1f4; }
.saisie-pointage .champ { margin: 0; }
.saisie-pointage .champ-large { grid-column: 1 / -2; }
.saisie-pointage select, .saisie-pointage input { width: 100%; font: inherit; font-size: .875rem; padding: .45rem .6rem; border: 1px solid var(--champ-bordure); border-radius: 7px; background: #fff; }
.saisie-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: .5rem; }
.tableau-pointages tfoot td { padding: .7rem .75rem; font-weight: 600; border-top: 1px solid #e3e7ec; }
.avancement-chiffre { margin: 0; font-size: 1rem; color: #4b5560; }
.avancement-chiffre strong { font-size: 1.9rem; color: var(--texte); margin-right: .15rem; }
.avancement-detail { border-top: 1px solid #eef1f4; padding-top: .8rem; }
@media (max-width: 900px) { .saisie-pointage { grid-template-columns: 1fr 1fr; } .saisie-pointage .champ-large { grid-column: 1 / -1; } }
.ligne-formulaire { display: grid; grid-template-columns: minmax(10rem, 1fr) 9rem 6rem 6rem auto; gap: 1rem; align-items: center; margin: 0; }
.ligne-formulaire input[type=text] { font: inherit; font-size: .875rem; padding: .4rem .6rem; border: 1px solid var(--champ-bordure); border-radius: 7px; }
.ligne-formulaire input.nombre { text-align: right; }
.tableau-compagnons th:nth-child(2) { width: auto; }
.or-onglets a .pastille-atelier { padding: .05rem .45rem; border-bottom: 0; color: #1857c0; font-weight: 600; }
.or-onglets a .pastille-atelier.complet { color: #1e7a46; }
.or-onglets { align-items: center; }
.tableau-atelier .c-type { width: 4.8rem; } .tableau-atelier .c-ref { width: 6.4rem; } .tableau-atelier .c-compagnon { width: 7rem; }
.tableau-atelier .c-etat { width: 6.6rem; } .tableau-atelier .c-temps { width: 5.2rem; } .tableau-atelier .c-date { width: 7rem; }
.tableau-atelier .mini-date { padding-left: .2rem; padding-right: .2rem; }
.tableau-pointages th { white-space: nowrap; }
.tableau-compagnons .c-pastille { width: 3.5rem; }
.tableau-compagnons th .ligne-formulaire span.nombre { text-align: right; }

/* Prix d'une ligne d'OR donné par une règle tarifaire (détail en info-bulle). */
.tableau-lignes td.prix-regle input[type=text], .tableau-lignes td.prix-regle { color: #1d6b3a; }
.tableau-lignes td.prix-regle input[type=text] { text-decoration: underline dotted; text-underline-offset: 3px; }

/* Administration : utilisateurs */
.onglets-administration { margin: 0 0 1.25rem; }
.badge-activite-liste { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-activite-liste-1 { background: var(--or-fond); color: var(--or-texte); }
.badge-activite-liste-2 { background: #e6f4ec; color: #1e7a46; }
.valeur-fixe { margin: .35rem 0 0; font-weight: 500; }
.liste-droits { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: #4b5560; display: grid; gap: .35rem; }

/* Tableau de bord : OR temps dépassé = avertissement orange (Regis, 01/11/2026), gris neutre s'il n'y en a pas ;
   orange plus vif que la tuile « OR en cours » pour ne pas les confondre. Filtre correspondant dans la liste des OR. */
.tuile-temps-depasse { --accent: #e8590c; --accent-fond: #fff0e3; }
.tuile-temps-depasse:not(.tuile-calme) .tuile-valeur { color: #c2410c; }
.tuile-temps-depasse.tuile-calme { --accent: #8a96a3; --accent-fond: #eef1f4; }
.filtre.filtre-alerte:not(.actif) span { color: #c2410c; }

/* Sous-traitance (type d'article 3) */
.badge-type.badge-st { background: #ece8fb; color: #5b3fc4; }

/* Administration : taux de TVA, catégories de clients (lignes modifiables) ; lien Mon compte */
.tableau-parametres th, .tableau-parametres td { padding: .5rem 1rem; }
.ligne-parametre { display: grid; gap: 1rem; align-items: center; margin: 0; }
.ligne-parametre form { margin: 0; }
.ligne-tva { grid-template-columns: minmax(12rem, 1fr) 7rem 6rem 8rem 7rem; }
.ligne-categorie { grid-template-columns: minmax(12rem, 1fr) 6rem 9rem 7rem 2rem; }
.ligne-unite { grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) 5rem 5rem 7rem 2rem; }
.ligne-depot { grid-template-columns: 7rem minmax(10rem, 1fr) 8rem 7rem 3.5rem 5rem 7rem 2rem; }
.ligne-parametre select { width: 100%; padding: .35rem .45rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 6px; background: #fff; }
.ligne-parametre .case-cellule { display: flex; justify-content: center; }
.ligne-parametre .nombre { text-align: right; }
.ligne-parametre > button, .ligne-parametre > form > button.bouton-primaire { justify-self: end; }
.ligne-parametre input[type=text] { width: 100%; padding: .35rem .55rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 6px; }
.ligne-parametre input[readonly] { background: #f6f8fa; color: var(--discret); }
.ligne-parametre .discret { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; }
a.menu-utilisateur-nom { color: inherit; text-decoration: none; border-radius: 6px; }
a.menu-utilisateur-nom:hover { text-decoration: underline; text-underline-offset: 3px; }
.ligne-parametre .bouton-supprimer { color: #c0362c; }
.ligne-parametre .bouton-supprimer:hover { background: #fdeceb; }

/* ---------------------------------------------------------------- Encaissements (phase 1) */
.saisie-encaissement .fiche-corps, .fiche-encaissement .fiche-corps { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.saisie-encaissement select, .saisie-encaissement input[type=text], .saisie-encaissement input[type=date] { width: 100%; }
.montant-saisi { font-size: 1.1rem !important; font-weight: 600; }
.repartition-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.repartition-entete .bloc-titre { margin: 0; }
.tableau-repartition, .tableau-lettrage { width: 100%; font-size: .875rem; }
.tableau-repartition td, .tableau-lettrage td { padding: .4rem .5rem; vertical-align: middle; }
.tableau-repartition input.nombre { width: 7rem !important; padding: .35rem .5rem; font: inherit; border: 1px solid #d6dce3; border-radius: 6px; text-align: right; }
.tableau-repartition input[aria-invalid=true] { border-color: var(--erreur); background: #fdeceb; }
.tableau-lettrage td.actions, .tableau-repartition td.actions { text-align: right; white-space: nowrap; }
.bilan-encaissement { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid #edf0f4; display: grid; gap: .35rem; }
.bilan-encaissement > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.bilan-encaissement dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bilan-encaissement .non-affecte { color: #1e7a46; }
.bilan-encaissement .non-affecte.depasse { color: var(--erreur); }
.montant-fort { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sous-titre-bloc { margin: 1.25rem 0 .5rem; font-size: .8rem; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .05em; }
.bloc-annulation { margin-top: 1rem; }
.ligne-annulation { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.ligne-annulation input { flex: 1; min-width: 16rem; padding: .45rem .7rem; font: inherit; border: 1px solid #d6dce3; border-radius: 7px; }
.bouton-danger { border: 0; border-radius: 7px; padding: .45rem .9rem; font: inherit; font-weight: 600; color: #fff; background: #c0362c; cursor: pointer; }
.bouton-danger:hover { background: #a42c23; }
.lien-danger { color: #c0362c; }
.fil-droite { text-align: right; }

.filtres-journal { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1rem; font-size: .875rem; }
.filtres-journal label { display: inline-flex; align-items: center; gap: .4rem; }
.filtres-journal input, .filtres-journal select { padding: .35rem .55rem; font: inherit; border: 1px solid #d6dce3; border-radius: 6px; background: #fff; }
.tuiles-journal { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tuile-journal { display: grid; gap: .15rem; padding: .75rem .9rem; background: var(--surface); border: 1px solid #e3e7ec; border-radius: 10px; }
.tuile-journal span { font-size: .78rem; color: var(--discret); }
.tuile-journal strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tuile-journal small { font-size: .75rem; color: var(--discret); }
.tuile-journal-total { border-color: #c7d9f0; background: #f3f8fd; }
.tuile-journal-credit { border-color: #b8dfc8; background: #f1faf4; }
.tuile-journal-credit strong { color: #1e7a46; }
.tableau-journal td.lettrage { display: flex; flex-wrap: wrap; gap: .3rem; }
.lettre { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; background: #eef3fb; color: #1857c0; text-decoration: none; white-space: nowrap; }
.lettre:hover { background: #dde8f8; }
.credit { color: #1e7a46; font-weight: 600; }
tr.ligne-negative td.nombre { color: #b42318; }
tr.ligne-annulee td { color: var(--discret); }
tr.ligne-annulee td.nombre { text-decoration: line-through; }
.compte-client { display: grid; gap: 1rem; }
.compte-client .tableau { width: 100%; }
.ligne-remboursement { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; font-size: .85rem; }
.ligne-remboursement label { display: grid; gap: .25rem; }
.ligne-remboursement input, .ligne-remboursement select { padding: .4rem .55rem; font: inherit; border: 1px solid #d6dce3; border-radius: 6px; }
@media (max-width: 900px) { .saisie-encaissement .fiche-corps, .fiche-encaissement .fiche-corps { grid-template-columns: 1fr; } }
.tableau-repartition td:first-child { white-space: nowrap; }
.ligne-remboursement input, .ligne-remboursement select { height: 2.3rem; box-sizing: border-box; }
.fiche-encaissement .infos .montant-fort { font-size: 1.15rem; font-weight: 700; }
.ligne-remboursement button { height: 2.3rem; }
/* Barres de champs en ligne (journal, remboursement) : sans la marge générale des étiquettes, hauteurs identiques. */
.filtres-journal label, .ligne-remboursement label { margin: 0; font-weight: 500; }
.filtres-journal input, .filtres-journal select, .filtres-journal button,
.ligne-remboursement input, .ligne-remboursement select, .ligne-remboursement button { height: 2.3rem; margin: 0; box-sizing: border-box; }
.filtres-journal input[type=search] { width: 16rem; }
.ligne-remboursement input[type=text] { width: 10rem; }
.outils-journal { display: flex; gap: .5rem; align-items: center; }


/* Fiche OR : associer ou changer le bateau après la création */
.associer-bateau { margin-top: .5rem; font-size: .85rem; }
.associer-bateau > summary { cursor: pointer; color: var(--primaire); list-style: none; display: inline; }
.associer-bateau > summary::-webkit-details-marker { display: none; }
.associer-bateau[open] > summary { color: var(--discret); }
.ligne-associer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .5rem 0 0; }
.ligne-associer select { height: 2.1rem; min-width: 14rem; padding: 0 .5rem; font: inherit; font-size: .85rem; border: 1px solid #b9c6d6; border-radius: 6px; background: #fff; }
.ligne-associer .lien-nouveau { color: var(--primaire); text-decoration: none; }
.ligne-associer .lien-nouveau:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Factures */
.facture-entete { border-top-color: #2474BC; }
.facture-entete .or-icone { background: #e3eefa; color: #1d5f9b; }
.facture-entete.facture-2 { border-top-color: #7b5cd6; } .facture-entete.facture-2 .or-icone { background: #efeafc; color: #5b3fc4; }
.facture-entete.facture-3 { border-top-color: #c0362c; } .facture-entete.facture-3 .or-icone { background: #fdeceb; color: #b42318; }
.facture-entete .or-onglets { padding: 0 1.25rem; display: flex; gap: 1.5rem; border-top: 1px solid #eef1f4; }
.badge-etat-brouillon { background: #eef1f4; color: #4b5560; border: 1px dashed #b9c3cd; }
.badge-facture { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 500; background: #e3eefa; color: #1d5f9b; }
.badge-facture-2 { background: #efeafc; color: #5b3fc4; }
.badge-facture-3 { background: #fdeceb; color: #b42318; }
.pastille-brouillon { border: 1px dashed #b9c3cd; }
.reste-du { font-weight: 600; color: #946200; }
.regle { color: #1e7a46; }
.echeance-depassee { color: #b42318; font-weight: 600; }
.bouton-outil-danger { color: #b42318; }
.bouton-outil-danger:hover { background: #fdeceb; color: #b42318; }
.or-outils form { margin: 0; }
.tableau-lignes-facture { width: 100%; font-size: .85rem; }
.tableau-lignes-facture td { padding: .4rem .6rem; vertical-align: top; }
.tableau-lignes-facture .italique { font-style: italic; color: #4b5560; }
.formulaire-facture { display: grid; gap: .75rem; }
.formulaire-facture .grille { gap: .6rem; }
.infos-colonne { grid-template-columns: 1fr; gap: .5rem; }
.factures-or { margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .8rem; }
.factures-or a { text-decoration: none; }
.tuile-retard.tuile-calme { --accent: #8a96a3; --accent-fond: #eef1f4; }

/* Bouton d'outil grisé (ex. Encaisser sur un document entièrement réglé) */
.bouton-outil-inactif { color: #b3bcc6; cursor: not-allowed; }
.bouton-outil-inactif:hover { background: transparent; color: #b3bcc6; }

/* Administration → Familles comptables */
.ligne-famille { grid-template-columns: 4.5rem minmax(10rem, 1fr) 11.5rem 7.5rem 7.5rem 7.5rem 3.5rem 3.5rem 7rem 2rem; gap: .6rem; }
.ligne-famille select { width: 100%; padding: .35rem .4rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 6px; background: #fff; }
.ligne-famille .case { margin: 0; justify-self: center; }
.familles-defaut { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin: .5rem 0; }
.familles-defaut .champ { min-width: 16rem; margin: 0; }
.familles-defaut .champ label { margin: 0 0 .3rem; }
.titre-section { font-size: 1.05rem; margin: 2rem 0 .5rem; }

/* Chaîne Devis → Commande → OR → Facture (Regis, 01/11/2026) */
.chaine-documents { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .35rem 0 0; font-size: .78rem; color: var(--discret); }
.badge-chaine { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-weight: 600; text-decoration: none; color: #2b3138; }
a.badge-chaine:hover { filter: brightness(.95); }
.badge-chaine-devis { background: #dcedf6; color: #0f3d55; }
.badge-chaine-commande { background: #e2f1de; color: #1f4a19; }
.badge-chaine-or { background: #fde7d1; color: #6b3a0f; }
.basculer { position: relative; }
.basculer > summary { list-style: none; cursor: pointer; }
.basculer > summary::-webkit-details-marker { display: none; }
.basculer-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 17rem; background: #fff; border: 1px solid var(--bordure);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 44, 68, .14); padding: .35rem; }
.basculer-menu form { margin: 0; }
.basculer-menu button { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; width: 100%; text-align: left;
    padding: .55rem .7rem; border: 0; border-radius: 7px; background: transparent; font: inherit; font-weight: 600; cursor: pointer; color: var(--texte); }
.basculer-menu button small { grid-column: 2; font-weight: 400; color: var(--discret); font-size: .75rem; }
.basculer-menu button:hover { background: var(--or-fond); }
.pastille-couleur { width: .8rem; height: .8rem; border-radius: 50%; grid-row: span 2; }
.pastille-commande { background: #B7DCAE; }
.pastille-or-couleur { background: #F3C08D; }

/* Accord du client sur une commande */
.bloc-accord { border-left: 4px solid #e2b04a; }
.bloc-accord.accord-donne { border-left-color: #3f7d34; }
.bloc-accord .aide { margin: .3rem 0 0; }
.accord-oui { color: #1e7a46; font-weight: 700; margin: .2rem 0 .5rem; }
.accord-detail { display: grid; gap: .3rem; margin: 0 0 .6rem; font-size: .85rem; }
.accord-detail div { display: grid; grid-template-columns: 7.5rem 1fr; }
.accord-detail dt { color: var(--discret); }
.accord-detail dd { margin: 0; overflow-wrap: anywhere; }
.form-accord { gap: .4rem; }
.form-accord .champ { margin: 0; }
.action-discrete { margin: -.4rem 0 .2rem; text-align: right; }
.lien-danger { color: #b3261e; }

/* Documents du cycle */
.documents-cycle { margin-bottom: 1.2rem; padding: .8rem 1rem; border-radius: 10px; background: #f6f8fa; }
.documents-cycle h3 { margin: 0 0 .4rem; font-size: .85rem; }
.documents-cycle-etape { margin: .6rem 0 .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--discret); }
.documents-cycle-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.documents-cycle-liste li { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .87rem; }
.categorie-accord { background: #e2f1de !important; color: #1f4a19 !important; font-weight: 600; }

/* Stock (Regis, 01/11/2026) : fiche article, badges de disponibilité des lignes */
.message-avertissement { background: #fff6e6; color: #8a5a00; border: 1px solid #f0d49b; margin-bottom: .75rem; }
.libelle-lecture { display: block; font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; }
.stock-negatif { color: var(--erreur); }
.bloc-stock { margin-top: 1.25rem; display: grid; gap: .9rem; }
.bloc-stock .bloc-titre { margin: 0; }
.bloc-stock .sous-titre { font-size: .8rem; font-weight: 600; color: #4b5563; margin: 0; }
.liste-reservations { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .875rem; }
.saisie-mouvement { display: grid; grid-template-columns: 11rem 7rem 10rem minmax(10rem, 1fr) auto; gap: .6rem; align-items: end; }
.saisie-mouvement .champ { margin: 0; }
@media (max-width: 900px) { .saisie-mouvement { grid-template-columns: 1fr 1fr; } }
.mouvement-entree { color: var(--succes); }
.mouvement-sortie { color: #8a3b12; }
.annuler-mouvement summary { cursor: pointer; color: var(--discret); font-size: .8rem; }
.annuler-mouvement form { display: flex; gap: .4rem; margin-top: .3rem; }
.badge-dispo { display: inline-block; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge-dispo-ok { background: #e3f3e8; color: #1e6b3d; }
.badge-dispo-partiel { background: #fff1d6; color: #8a5a00; }
.badge-dispo-manque { background: #fde2e0; color: #a1271f; }
.badge-dispo-sortie { background: #eceff3; color: #4b5563; }
.badge-dispo-transit { background: #e1eefa; color: #1d5f9e; }
.badge-dispo-ailleurs { background: #fde9d4; color: #a14a00; }
.verrou-stock { color: #8a5a00; background: #fff1d6; }
.petit { font-size: .75rem; }
.tableau-lignes.avec-stock .c-qte { width: 5.4rem; }
.tableau-lignes td.col-qte-stock { position: relative; padding-left: 1.35rem; }
.col-qte-stock .pop-stock { position: absolute; left: .1rem; top: calc(50% - 12px); }
.col-qte-stock .pop-stock[open] { z-index: 40; }
.pop-stock > summary { list-style: none; cursor: pointer; padding: .25rem; border-radius: 6px; display: inline-flex; }
.pop-stock > summary::-webkit-details-marker { display: none; }
.pop-stock > summary:hover { background: #eef1f4; }
.pastille-dispo { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; }
.pastille-dispo.badge-dispo-ok { background: #2f9e5b; color: #2f9e5b; }
.pastille-dispo.badge-dispo-partiel { background: linear-gradient(90deg, #e2a12b 50%, #fff 50%); color: #e2a12b; }
.pastille-dispo.badge-dispo-manque { background: #fff; color: #d0453b; }
.pastille-dispo.badge-dispo-sortie { background: #9aa5b1; color: #9aa5b1; }
.pastille-dispo.badge-dispo-transit { background: #2474bc; color: #2474bc; }
.pastille-dispo.badge-dispo-ailleurs { background: #e8892b; color: #e8892b; }
.badge-dispo-commande { background: #eee8fa; color: #5b3a9e; }
.pastille-dispo.badge-dispo-commande { background: #7c5cc4; color: #7c5cc4; }
.pop-stock-contenu { position: fixed; z-index: 60; width: 18rem; text-align: left; background: #fff; border: 1px solid #dfe4ea; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(20, 44, 68, .14); padding: .7rem .8rem; display: grid; gap: .45rem; justify-items: start; font-size: .8rem; white-space: normal; }
.pop-stock-contenu p { margin: 0; color: #374151; line-height: 1.45; }
.barre-stock { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: .55rem 1rem; border-bottom: 1px solid #eef1f4; }
.barre-stock .message { flex-basis: 100%; margin: 0; }
.grille-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grille-4 { grid-template-columns: 1fr 1fr; } }
.aide-page { margin: 0 0 .9rem; font-size: .875rem; }
.nouvel-inventaire { display: grid; gap: .8rem; margin-bottom: 1.25rem; justify-items: start; }
.nouvel-inventaire .grille { width: 100%; }
.nouvel-inventaire .bloc-titre, .nouvel-inventaire p { margin: 0; }
.saisie-comptage { width: 7rem; }
.actions-inventaire { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.actions-inventaire p { flex-basis: 100%; margin: 0; }
@media print {
    .ne-pas-imprimer, .menu-lateral, .barre-mobile { display: none !important; }
    .saisie-comptage { border: 0; border-bottom: 1px solid #999; border-radius: 0; }
}
/* Formulaires hors fiche (mouvement de stock, inventaire) : mêmes champs que les fiches */
.formulaire-simple input[type=text], .formulaire-simple input[type=date], .formulaire-simple select, .tableau-inventaire input[type=text] {
    min-height: 38px; padding: .45rem .75rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 7px; background: #fff; color: var(--texte); width: 100%;
}
.formulaire-simple select { appearance: none; padding-right: 2.2rem; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666767' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center; }
.formulaire-simple .champ label { font-size: .8rem; font-weight: 500; color: #4b5563; margin-bottom: .3rem; display: block; }
.tableau-inventaire input[type=text] { min-height: 32px; padding: .3rem .5rem; text-align: right; }
.legende-stock { border-top: 0; padding-top: 0; }
.or-infos-lien { margin: .5rem 0 0; font-size: .8rem; }

/* Fournisseurs (fiche fournisseur, onglet Fournisseurs de l'article) */
.bloc-annexe { margin-top: 1.25rem; display: grid; gap: .9rem; }
.bloc-annexe .bloc-titre { margin: 0; }
.saisie-annexe { display: grid; grid-template-columns: repeat(4, minmax(8rem, 1fr)) auto; gap: .6rem; align-items: end; }
.saisie-annexe .champ { margin: 0; }
.saisie-annexe .case { align-self: center; white-space: nowrap; }
.saisie-lien { grid-template-columns: minmax(10rem, 1.4fr) minmax(8rem, 1fr) 7rem 6rem auto auto; }
.saisie-lien-article { grid-template-columns: minmax(10rem, 1.4fr) minmax(8rem, 1fr) 7rem 6rem 6rem 6rem auto auto; }
@media (max-width: 900px) { .saisie-annexe, .saisie-lien, .saisie-lien-article { grid-template-columns: 1fr 1fr; } }
.pastille-principal { background: #e6f4ec; color: #1e7a46; }
.zone-suppression { margin-top: 1.5rem; text-align: right; }
.texte-danger { color: #c0362c; }
.tableau-fournisseurs input[type=text] { width: 100%; min-width: 0; }
.tableau-fournisseurs td.actions { white-space: nowrap; }
.sous-traitant { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; font-size: .75rem; color: var(--discret); }
.sous-traitant select.mini { margin-top: 0; }
.tableau .ligne-groupe th { background: #f3f6fa; text-align: left; font-weight: 600; padding-top: .6rem; }
.bloc-annexe .tableau td.nombre { white-space: nowrap; }
.tableau-droits .centre { text-align: center; }
.tableau-droits .droit-oui { color: #1e7a46; font-weight: 700; }
.tableau-droits .droit-non { color: #c4cad3; }

/* ---------------------------------------------------------------- Multi-dépôts (Regis, 02/11/2026) */
.tableau-depots-article input[type=text] { width: 100%; max-width: 9rem; padding: .3rem .5rem; font: inherit; font-size: .875rem; border: 1px solid #d6dce3; border-radius: 6px; }
.tableau-depots-article tfoot td { font-weight: 600; border-top: 1px solid #d6dce3; }
.depots-article { display: inline-flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .8rem; }
.depots-article .depot-qte { white-space: nowrap; }
.depots-article .depot-qte b { font-weight: 600; color: #4b5563; }
.etat-stock-filtres { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin-bottom: 1rem; }
.etat-stock-filtres label { display: grid; gap: .2rem; font-size: .8rem; color: #4b5563; }
.etat-stock-filtres select, .etat-stock-filtres input[type=text] { padding: .35rem .5rem; font: inherit; font-size: .9rem; border: 1px solid #d6dce3; border-radius: 6px; background: #fff; }
.etat-stock-filtres .case { flex-direction: row; align-items: center; display: flex; gap: .35rem; }
.tableau-etat-stock tfoot td { font-weight: 600; border-top: 2px solid #d6dce3; }
.groupe-depot td { background: #f3f6f9; font-weight: 600; color: #374151; }
.sous-titre-section { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .6rem; }
.depots-activites { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.depots-activites .champ { min-width: 14rem; }
.pop-stock-ailleurs { display: grid; margin: .2rem 0 0; font-size: .8rem; }
.pop-stock-ailleurs span { white-space: nowrap; }
.tableau-depots-article .depot-reel-negatif { color: #c0362c; }

/* Transferts entre dépôts (étape 3) */
.statut-transfert { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.statut-transfert-demande { background: #fde9d4; color: #a14a00; }
.statut-transfert-transit { background: #e1eefa; color: #1d5f9e; }
.statut-transfert-recu { background: #e3f3e8; color: #1e6b3d; }
.statut-transfert-annule { background: #eceff3; color: #4b5563; }
.transfert-retard { color: #c0362c; font-weight: 600; }
.tableau-transfert input[type=text] { width: 6rem; text-align: right; padding: .3rem .5rem; font: inherit; border: 1px solid #d6dce3; border-radius: 6px; }
.actions-transfert { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }
.nouveau-transfert .lignes-saisie { display: grid; grid-template-columns: minmax(10rem, 16rem) 7rem; gap: .4rem .75rem; margin: .5rem 0 1rem; }
.nouveau-transfert .lignes-saisie input { padding: .35rem .5rem; font: inherit; border: 1px solid #d6dce3; border-radius: 6px; }
.barre-transfert { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .25rem 0 .5rem; }

/* Dépôt d'un document (multi-dépôts) : badge en tête de l'OR et de la commande. */
.badge-depot { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 500;
    white-space: nowrap; vertical-align: middle; background: #eef4fb; color: #1d5f9e; box-shadow: inset 0 0 0 1px #cfe0f2; }
.pop-stock-transferts { display: grid; gap: .15rem; margin: .35rem 0 0; padding-top: .35rem; border-top: 1px solid #eef1f4; font-size: .78rem; }
.pop-stock-transferts a { font-weight: 600; }

/* Approvisionnement d'une commande (Regis, 03/11/2026) : résumé dans le côté, détail dans l'onglet. */
.bloc-appro .appro-compte { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .3rem; font-size: .875rem; }
.bloc-appro .appro-compte li { display: flex; align-items: center; gap: .45rem; }
.bloc-appro .appro-compte strong { margin-left: auto; }
.appro-estimation { font-size: .875rem; margin: .5rem 0; }
.lien-detail { font-size: .825rem; }
.appro-synthese { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.appro-carte { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid #e3e7ec; border-radius: 8px; font-size: .85rem; background: #fff; }
.appro-carte-date { border-color: #b7dcae; background: #f3faf1; }
.tableau-appro td { vertical-align: middle; }
.tableau-appro td .badge-dispo { margin-right: .25rem; }
.tableau-appro tr.appro-a-commander td { background: #fffaf9; }
.texte-alerte { color: #a1271f; font-weight: 600; }
.appro-suite { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.or-onglets a .pastille-atelier.pastille-a-commander, .pastille-a-commander { background: #fde2e0; color: #a1271f; }
.appro-date { white-space: nowrap; }

/* Bons de commande fournisseurs (Regis, 03/11/2026). */
.statut-bcf { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.statut-bcf-brouillon { background: #eceff3; color: #374151; }
.statut-bcf-envoyee { background: #eee8fa; color: #5b3a9e; }
.statut-bcf-partielle { background: #e1eefa; color: #1d5f9e; }
.statut-bcf-recue { background: #e3f3e8; color: #1e6b3d; }
.statut-bcf-annulee { background: #eceff3; color: #6b7280; text-decoration: line-through; }
.bcf-entete { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.bcf-entete .bloc { margin: 0; }
.tableau-bcf input[type=text] { width: 5rem; text-align: right; }
.tableau-bcf td.nombre, .appro-bon { white-space: nowrap; }
.bcf-entete .fiche button { justify-self: start; width: auto; }
.bcf-envoi { margin: 0; }
.tableau-bcf tfoot td { font-weight: 700; border-top: 2px solid #d5dbe1; }
.bcf-ajout { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: .75rem 0; }
.bcf-ajout input[name=reference] { width: 16rem; }
.bcf-ajout input[name=quantite] { width: 6rem; }
.appro-bons { font-size: .875rem; margin-top: .75rem; }
.form-groupe-bcf { display: inline-block; margin-left: .75rem; font-weight: 400; }

/* Réceptions fournisseurs (Regis, 03/11/2026). */
.tableau-reception .commentaire-divergence { width: 14rem; margin-top: .25rem; }
.tableau-reception .case { font-size: .8rem; }
.ligne-soldee td { color: var(--discret); }
.bloc-divergences { border-left: 4px solid #d0453b; }
.divergence-ouverte { color: #a1271f; font-weight: 600; }
.liste-reception { margin: .2rem 0 .8rem; padding-left: 1.2rem; font-size: .875rem; }
.bloc a.bouton-primaire, .bloc a.bouton-primaire:hover { color: #fff; text-decoration: none; }
.tableau-reception td:last-child { min-width: 16rem; }
.tableau-reception .commentaire-divergence { width: 16rem; max-width: 100%; }
.numero-doc { white-space: nowrap; }
.bcf-entete form.fiche > button.bouton-secondaire { width: auto; display: inline-flex; }
.champ-reference { width: 18rem; }

/* Comptabilité : journal des ventes (écritures, totaux par compte) et paramètres comptables. */
.message-avertissement ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.pastille-alerte { background: #fff1d6; color: #8a5a00; margin-left: .3rem; }
.tuile-journal-alerte { border-color: #f2c2be; background: #fdeceb; }
.tuile-journal-alerte strong { color: var(--erreur); }
.tableau-ecritures td.compte, .tableau-journal td.compte { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.tableau-ecritures tr.debut-piece td { border-top: 2px solid #d7dee6; }
.tableau-ecritures tr.ligne-alerte td { background: #fffaf0; }
.tableau-comptes-tva { width: 100%; }
.tableau-comptes-tva input { width: 100%; max-width: 12rem; }

/* Remises en banque. */
a.tuile-journal-lien { color: inherit; text-decoration: none; }
a.tuile-journal-lien:hover { border-color: #c7d9f0; background: #f7fafd; }
.champs-remise { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; align-items: end; }
.champs-remise label { display: grid; gap: .3rem; font-size: .85rem; color: var(--discret); }
.champs-remise label.large { grid-column: 1 / -1; }
.champs-remise input, .champs-remise select { width: 100%; }
.tableau-remise td:first-child, .tableau-remise th:first-child { width: 2.2rem; }
@media (max-width: 700px) { .champs-remise { grid-template-columns: 1fr; } }

/* Onglet « Marge du document » (Regis, 03/11/2026) : devis, commandes, OR ; jamais imprimé. */
.bloc-marge .tableau-cadre { margin-top: .75rem; overflow-x: auto; }
.marge-synthese { display: flex; flex-wrap: wrap; gap: .6rem; margin: .5rem 0 .9rem; }
.marge-carte { display: flex; flex-direction: column; gap: .1rem; min-width: 170px; padding: .55rem .85rem; border: 1px solid #e3e7ec; border-radius: 8px; background: #fff; }
.marge-carte strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.marge-carte-principale { border-color: #9cc3e6; background: #f2f8fd; }
.marge-carte-libelle { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--discret); }
.marge-carte-detail { font-size: .78rem; color: var(--discret); }
.tableau-marge td.nombre, .tableau-marge th.nombre { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau-marge .marge-groupe th { background: #eef2f6; color: #2f3a45; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tableau-marge .marge-ref { font-weight: 600; margin-right: .3rem; }
.tableau-marge td:first-child { min-width: 20rem; }
.tableau-marge .marge-heures { display: block; font-size: .78rem; color: var(--discret); }
.tableau-marge .marge-ecart { white-space: nowrap; }
.tableau-marge .marge-enfant td:first-child { padding-left: 1.8rem; }
.tableau-marge .marge-enfant td { color: #56636f; font-size: .82rem; }
.tableau-marge .marge-inconnue td { background: #fff8ec; }
.tableau-marge .marge-total-groupe td { font-weight: 600; border-top: 1px solid #d5dde8; }
.tableau-marge .marge-total td { font-weight: 700; border-top: 2px solid #9fb0c2; background: #f6f8fa; }
.tableau-marge .marge-saisie { width: 7rem; padding: .2rem .4rem; text-align: right; }
.marge-negative { color: #c0362c; }
.marge-estime { color: #8a6a1f; font-style: italic; }
.marge-origine { color: var(--discret); font-size: .8rem; }
/* Calumma : équivalences d'une ligne (surface, prix à l'unité de prix, conditionnements complets). */
.equivalence-ligne { margin: .15rem 0 0; font-size: .78rem; color: var(--discret); white-space: normal; }

/* Bons de livraison (Calumma, Regis 03/11/2026) : couleur paille #E6D49A. */
.theme-bl { --or: #E6D49A; --or-fond: #faf6e8; --or-bordure: #e6d49a; --or-fonce: #8a6d12; --or-texte: #4d3d0a; --or-survol: #dcc77f; --or-nomenclature: #f3ebcc; --or-nomenclature-survol: #ece0b6; }
.badge-chaine-bl { background: #f3ebcc; color: #4d3d0a; }
.badge-livraison { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: 0; text-transform: none; padding: .1rem .5rem; border-radius: 999px; vertical-align: middle; }
.badge-livraison-a_livrer { background: #fdf3dc; color: #946200; }
.badge-livraison-partielle { background: #e8f0fb; color: #1857c0; }
.badge-livraison-livree { background: #e6f4ec; color: #1e7a46; }
.bloc-entete-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bloc-entete-actions .bloc-titre { margin: 0; }
.actions-ligne { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tableau-livraisons tr.ligne-livree td { color: var(--discret); }
.tableau-bl td.nombre input { width: 7rem; text-align: right; }
.tableau-bl tr.ligne-vide td { color: var(--discret); }
.tableau-bl .equivalence-ligne { margin: .15rem 0 0; font-size: .78rem; color: #8a5a2b; }
.stock-manquant { color: #b42318; font-weight: 600; }

/* Onglet Atelier : bouton « Fiche atelier » à droite des filtres (Regis, 04/11/2026). */
.or-atelier .lignes-entete { justify-content: flex-start; }
.or-atelier .lignes-entete .filtres-atelier { margin-left: auto; }

/* Statut payeur du client (Regis, 04/11/2026) : badge sur la fiche, alerte sur les documents. */
.badge-statut-payeur { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-statut-payeur::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.statut-payeur-normal { background: #e6f4ec; color: #1e7a46; }
.statut-payeur-surveillance { background: #fdf3dc; color: #946200; }
.statut-payeur-comptant { background: #fdebd9; color: #a24a00; }
.statut-payeur-bloque { background: #fdeceb; color: #b3261e; }
.statut-payeur-actuel { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.statut-payeur-actuel p { flex-basis: 100%; margin: 0; }
.statut-payeur-note { white-space: pre-line; font-size: .9rem; }
.statut-payeur-bouton { justify-content: flex-end; }
.indicateurs-payeur th { text-align: left; font-weight: 500; width: 55%; }
.message-payeur { margin-bottom: 1rem; border: 1px solid; }
.message-payeur.statut-payeur-surveillance { border-color: #f0d79a; }
.message-payeur.statut-payeur-comptant { border-color: #f2c39a; }
.message-payeur.statut-payeur-bloque { border-color: #f1b8b3; }
.passer-outre { display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .8rem; border: 1px solid #f1b8b3; background: #fdeceb; color: #b3261e; border-radius: 6px; }

/* Extractions (Regis, 04/11/2026) : listes livrées, paramètres, résultat. */
.intro-extractions { color: #4b5560; font-size: .9rem; margin: 0 0 1rem; max-width: 70ch; }
.cartes-extractions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.carte-extraction { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; align-items: start; padding: .9rem 1rem;
    background: var(--surface, #fff); border: 1px solid var(--bordure, #dfe4ea); border-radius: var(--rayon, 8px); color: inherit; text-decoration: none; }
.carte-extraction:hover { border-color: var(--primaire, #2474BC); box-shadow: 0 6px 18px rgba(20, 44, 68, .08); }
.carte-extraction-icone { grid-row: span 2; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #e8f0fa; color: var(--primaire, #2474BC); }
.carte-extraction strong { font-weight: 600; color: #1f2933; }
.carte-extraction span:last-child { font-size: .82rem; color: #5b6772; }
.parametres-extraction .nombre-court { width: 5.5rem; }
.parametres-extraction [hidden] { display: none; }
.tableau-extraction td { white-space: nowrap; }
