/* BDL EXPERTS, Tableau de Bord. Feuille de style maison, mobile d'abord.
   Points de rupture : 600px (grand téléphone), 900px (tablette), 1200px (ordinateur). */

/* Charte BDL EXPERTS (bdl-experts.com) : Open Sans, rouge #b61213, gris #333 / #bebdbd / #eae9e9, blanc.
   Le vert signale ce qui relève de la pharmacie : hausses, statuts favorables, périodes, pictogramme. */
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-latin.dcf31ebe1074.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: "Open Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-latin-ext.062c1f2aaf2d.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --encre: #333333;
  --encre-2: #4d4d4d;
  --encre-3: #6e6e6e;
  --bord: #eae9e9;
  --bord-fort: #bebdbd;
  --fond: #ffffff;
  --fond-doux: #f7f7f7;
  --fond-gris: #f1f0f0;
  /* Rouge BDL : marque, actions principales, liens */
  --accent: #b61213;
  --accent-fonce: #9b1a1a;
  --accent-doux: #fbeaea;
  /* Vert pharmacie */
  --vert: #2e8540;
  --vert-fonce: #1f6b33;
  --vert-doux: #e9f5ec;
  --vert-bord: #b7dcc4;
  --rouge: #b61213;
  --rouge-fonce: #9b1a1a;
  --rouge-doux: #fbeaea;
  --ambre: #92400e;
  --ambre-doux: #fff7e6;
  --brouillon: #fff8c5;
  --focus: #9b1a1a;
  --rayon: 12px;
  --rayon-moyen: 8px;
  --rayon-petit: 6px;
  --ombre: 0 1px 2px rgba(51, 51, 51, .05), 0 1px 3px rgba(51, 51, 51, .09);
  --ombre-forte: 0 8px 24px rgba(51, 51, 51, .14);
  --police: "Open Sans", Arial, Helvetica, sans-serif;
  /* Hauteur minimale des éléments cliquables : 44px au doigt, plus compacte à la souris (≥ 900px) */
  --cible: 44px;
  --cible-2: 40px;
  --cible-petite: 36px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 15px; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.45rem; margin: 0 0 .25rem; font-weight: 600; color: var(--accent); }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 0 0 .5rem; font-weight: 600; }
a { color: var(--accent-fonce); text-decoration: underline; text-decoration-color: rgba(155, 26, 26, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden], .masque { display: none !important; }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--fond); padding: .5rem 1rem; z-index: 100; }
.lien-evitement:focus { left: 1rem; }
.aligne-droite { text-align: right; }
.aide { color: var(--encre-3); font-size: .875rem; margin: .25rem 0 .75rem; }
.erreur, .erreur-cellule { color: var(--rouge); font-size: .875rem; margin: .25rem 0; }
.erreur-cellule { display: block; font-size: .75rem; max-width: 9rem; white-space: normal; }
.sans-retour { white-space: nowrap; }
.seulement-large { display: none !important; }
.seulement-mobile { display: block; }

/* --- En-tête -------------------------------------------------------------------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(8px);
  border-top: 4px solid var(--accent); border-bottom: 1px solid var(--bord);
}
.entete__interieur {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  max-width: 1400px; margin: 0 auto; padding: .5rem 1rem;
}
.marque-entete { display: flex; align-items: center; flex: none; }
.marque-entete__logo { display: block; width: auto; height: 40px; }
.entete__titre { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1; padding-left: 1rem; border-left: 1px solid var(--bord-fort); }
.entete__pictogramme { flex: none; width: 28px; height: 28px; }
.entete__textes { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.entete__app { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--vert-fonce); font-weight: 600; }
.entete__page { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Choix de la pharmacie (plusieurs dossiers) : le titre de l'en-tête ouvre la liste */
.choix-pharmacie { position: relative; min-width: 0; }
.choix-pharmacie__bouton {
  display: flex; align-items: center; gap: .6rem; min-width: 0; margin: -.3rem -.5rem; padding: .3rem .5rem;
  border-radius: var(--rayon-petit); cursor: pointer; transition: background .15s;
}
.choix-pharmacie__bouton:hover, .choix-pharmacie[open] .choix-pharmacie__bouton { background: var(--fond-gris); }
.choix-pharmacie__bouton .chevron {
  width: 14px; height: 14px; color: var(--encre-3); transform: rotate(90deg); transition: transform .15s;
  align-self: flex-end; margin-bottom: .15rem;
}
.choix-pharmacie[open] .choix-pharmacie__bouton .chevron { transform: rotate(-90deg); }
.choix-pharmacie__liste {
  position: absolute; top: calc(100% + .5rem); left: -.5rem; z-index: 30; width: max-content; min-width: calc(100% + 1rem); max-width: min(26rem, calc(100vw - 2rem));
  max-height: 60vh; overflow-y: auto; list-style: none; margin: 0; padding: .3rem;
  background: var(--fond); border: 1px solid var(--bord); border-radius: var(--rayon-moyen); box-shadow: var(--ombre-forte);
}
.choix-pharmacie__liste a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--cible); padding: .25rem .75rem;
  border-radius: var(--rayon-petit); color: var(--encre); text-decoration: none; font-weight: 500;
}
.choix-pharmacie__liste a:hover { background: var(--fond-gris); color: var(--accent); }
.choix-pharmacie__liste a[aria-current=page] { background: var(--accent-doux); color: var(--accent); font-weight: 700; }
.choix-pharmacie__code { color: var(--encre-3); font-size: .75rem; font-weight: 400; }
.entete__bouton-menu {
  display: none; width: 44px; height: 44px; border: 1px solid var(--bord); border-radius: var(--rayon-moyen);
  background: var(--fond); cursor: pointer; align-items: center; justify-content: center;
}
.js .entete__bouton-menu { display: inline-flex; }
.icone-menu, .icone-menu::before, .icone-menu::after { display: block; width: 18px; height: 2px; background: var(--encre); border-radius: 2px; position: relative; }
.icone-menu::before, .icone-menu::after { content: ""; position: absolute; left: 0; }
.icone-menu::before { top: -6px; }
.icone-menu::after { top: 6px; }
.entete__menu { width: 100%; }
.js .entete__menu { display: none; }
.js .entete__menu.ouvert { display: block; }
.entete__menu ul { list-style: none; margin: 0; padding: .25rem 0 .5rem; display: flex; flex-direction: column; gap: .125rem; }
.entete__menu form { margin: 0; }
.lien-nav {
  display: flex; align-items: center; min-height: var(--cible); padding: 0 .75rem; border-radius: var(--rayon-petit);
  color: var(--encre); text-decoration: none; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; width: 100%;
}
.lien-nav:hover { background: var(--fond-gris); color: var(--accent); }
.lien-nav--compte { color: var(--encre-3); font-weight: 400; overflow-wrap: anywhere; }
.lien-bouton {
  background: none; border: 0; padding: 0 .25rem; font: inherit; color: var(--encre-2); cursor: pointer; min-height: var(--cible); border-radius: var(--rayon-petit);
}
.lien-bouton:hover { color: var(--encre); background: var(--fond-gris); }

/* --- Mise en page ------------------------------------------------------------------ */
.contenu { padding: 1rem; max-width: 1400px; margin: 0 auto; }
.contenu--carte { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--fond-gris); }
.en-tete-page { margin: .25rem 0 1rem; }
.en-tete-page--actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; justify-content: space-between; }
.en-tete-page__sous-titre { color: var(--encre-3); margin: .25rem 0 0; font-size: .95rem; }
.carte { background: var(--fond); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.25rem; margin: 0 0 1rem; }
.carte--etroite, .panneau--etroit { max-width: 40rem; }
.carte--tableau { padding: 0; overflow: hidden; }
.panneau { background: var(--fond); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.25rem; margin: 0 auto 1rem; }
.grille-cartes { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.carte--lien { display: flex; flex-direction: column; gap: .25rem; text-decoration: none; color: var(--encre); transition: box-shadow .15s, transform .15s; }
.carte--lien:hover { box-shadow: var(--ombre-forte); transform: translateY(-1px); }
.carte__surtitre { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); font-weight: 600; }
.carte__chiffre { font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.carte__texte { color: var(--encre-2); font-size: .9rem; }
.messages { margin-bottom: 1rem; }
.message { border-radius: var(--rayon-moyen); padding: .7rem .9rem; margin: 0 0 .5rem; border: 1px solid var(--bord); background: var(--fond-doux); }
.message--success { border-color: var(--vert-bord); background: var(--vert-doux); }
.message--error { border-color: #f3b4ae; background: var(--rouge-doux); }
.message--avertissement, .message--warning { border-color: #f5d29a; background: var(--ambre-doux); }
.message--action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.liste-recap { padding-left: 1.25rem; margin: .5rem 0 1rem; }
.liste-recap li { margin-bottom: .3rem; }
.retour { font-size: .875rem; }
.retour--ok { color: var(--vert); }
.retour--erreur { color: var(--rouge); }
.pastille-statut {
  display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: var(--fond-gris); color: var(--encre-2); vertical-align: middle;
}
.pastille-statut--ouvert { background: var(--vert-doux); color: var(--vert-fonce); }

/* --- Sous-navigation (Administration) --------------------------------------------- */
.sous-nav { display: flex; gap: .25rem; overflow-x: auto; margin: 0 0 1.25rem; padding: .25rem; background: var(--fond-gris); border-radius: var(--rayon-moyen); }
.sous-nav a { white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--cible-2); padding: 0 .9rem; border-radius: var(--rayon-petit); text-decoration: none; color: var(--encre-2); font-weight: 500; }
.sous-nav a[aria-current=page] { background: var(--fond); color: var(--encre); box-shadow: var(--ombre); font-weight: 600; }

/* --- Carte de connexion ------------------------------------------------------------ */
.carte-connexion {
  width: 100%; max-width: 26rem; background: var(--fond); border: 1px solid var(--bord); border-top: 4px solid var(--accent);
  border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 2rem 1.5rem;
}
.marque { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.marque__logo { display: block; width: 150px; height: auto; }
.marque__app {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0; padding: .3rem .8rem .3rem .55rem; border-radius: 999px;
  background: var(--vert-doux); color: var(--vert-fonce); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.marque__app img { display: block; }
.separateur { border: 0; border-top: 1px solid var(--bord); margin: 1.25rem 0 1.5rem; }
.carte-connexion h1 { text-align: center; }
.sous-titre { text-align: center; color: var(--encre-3); margin: 0 0 1.5rem; }
.etapes { padding-left: 1.25rem; }
.qr { display: block; margin: .5rem auto; border: 1px solid var(--bord); border-radius: var(--rayon-petit); }
.cle { display: block; word-break: break-all; font-size: 1rem; padding: .25rem 0; }

/* --- Formulaires ----------------------------------------------------------------------- */
.champ { margin-bottom: 1rem; }
.champ label, .champ legend, .choix-dossier label, .filtres label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; color: var(--encre-2); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: var(--cible); padding: .55rem .75rem; font: inherit; font-size: 16px; color: var(--encre);
  background: var(--fond); border: 1px solid var(--bord-fort); border-radius: var(--rayon-moyen);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(182, 18, 19, .15); }
/* Listes déroulantes : flèche dessinée, à distance fixe du bord droit et centrée verticalement */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 2.6rem;
  background-image: url("../img/chevron-bas.8bd40f2c57c1.svg"); background-repeat: no-repeat; background-position: right .95rem center; background-size: 12px 8px;
}
select::-ms-expand { display: none; }
textarea { min-height: 5rem; resize: vertical; }
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--rouge); }
.cases { border: 1px solid var(--bord); border-radius: var(--rayon-moyen); padding: .5rem .75rem; max-height: 18rem; overflow: auto; margin: 0 0 1rem; }
.cases > div > div, .case-dossier { display: flex; align-items: center; gap: .5rem; min-height: var(--cible); }
.cases label { font-weight: 400; display: inline; margin: 0; color: var(--encre); }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
.case { display: flex; align-items: center; gap: .5rem; min-height: var(--cible); font-weight: 400 !important; }
.grille-formulaire { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; }
.choix-dossier__ligne { display: flex; gap: .5rem; }
.choix-dossier__ligne select { flex: 1; min-width: 0; }

/* --- Boutons ------------------------------------------------------------------------------ */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--cible); padding: .5rem 1rem;
  border: 1px solid var(--bord-fort); border-radius: var(--rayon-moyen); background: var(--fond); color: var(--encre);
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: center; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.bouton:hover { background: var(--fond-gris); }
.bouton--principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton--principal:hover { background: var(--accent-fonce); }
.bouton--rouge { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton--rouge:hover { background: var(--rouge-fonce); }
.bouton--discret { border-color: transparent; background: var(--fond-gris); }
.bouton--discret:hover { background: var(--bord); }
.bouton--danger { color: var(--rouge); border-color: #f3b4ae; }
.bouton--petit { min-height: var(--cible-petite); padding: .3rem .75rem; font-size: .85rem; }
.bouton--large { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; align-items: center; margin-top: 1rem; }
.actions-gauche { display: flex; flex-wrap: wrap; gap: .75rem; }
.actions--collantes {
  position: sticky; bottom: 0; z-index: 5; margin: 1rem -1rem 0; padding: .75rem 1rem;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-top: 1px solid var(--bord);
}
.lien-discret { font-size: .9rem; display: inline-flex; align-items: center; min-height: var(--cible); }
.actions-carte { margin-top: .75rem; }
.carte__action { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .75rem; font-size: .875rem; font-weight: 600; color: var(--accent); }
.carte__action .chevron { width: 14px; height: 14px; transition: transform .15s; }
.carte--lien:hover .carte__action .chevron { transform: translateX(3px); }

/* --- Icônes fléchées (chevrons SVG, centrés optiquement) ------------------------------- */
.chevron { display: block; flex: none; }
.chevron--gauche { transform: scaleX(-1); }
.carte--lien { min-height: 11rem; }
.carte__liste { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; margin: .25rem 0 0; font-size: .875rem; }
.carte__liste dt { color: var(--encre-2); }
.carte__liste dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* --- Barre d'outils ------------------------------------------------------------------------- */
.barre-outils { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; margin-bottom: 1rem; }
.barre-outils__liens { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.choix-dossier, .choix-page, .filtres { flex: 1 1 16rem; max-width: 30rem; }
.choix-page label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; color: var(--encre-2); }
.filtres { margin-bottom: 1rem; }

/* --- Tableaux ---------------------------------------------------------------------------------- */
.defilement-horizontal { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: .925rem; }
.tableau th, .tableau td { border-bottom: 1px solid var(--bord); padding: .7rem .9rem; text-align: left; vertical-align: top; }
.tableau thead th { background: var(--fond-doux); color: var(--encre-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.tableau tbody tr:last-child th, .tableau tbody tr:last-child td { border-bottom: 0; }
.tableau--compact { font-size: .85rem; }
.tableau--compact th, .tableau--compact td { padding: .4rem .5rem; }
.tableau--compact td { text-align: right; white-space: nowrap; }
/* « Voir les données » : filets verticaux entre les colonnes */
.tableau--compact th + th, .tableau--compact td { border-left: 1px solid var(--bord); }
.page-tdb > .donnees[open] { margin-bottom: 1rem; }
.inactif { color: var(--encre-3); }
.actions-ligne { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; }
.cellule-actions { width: 1%; white-space: nowrap; }
.tableau td, .tableau th { vertical-align: middle; }
.cellule-principale { display: block; font-weight: 600; color: var(--encre); }
.texte-discret { color: var(--encre-3); }
.raison-refus { display: block; max-width: 16rem; font-size: .8rem; color: var(--encre-3); white-space: normal; text-align: right; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .3rem; }
.etiquette {
  display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--fond-gris); color: var(--encre-2); border: 1px solid var(--bord); white-space: nowrap;
}
.etiquette--admin { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.etiquette--collaborateur { background: var(--vert-doux); color: var(--vert-fonce); border-color: var(--vert-bord); }
.etiquette--client { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
.etiquette--publie { background: var(--vert-doux); color: var(--vert-fonce); border-color: var(--vert-bord); }
.etiquette--retard { background: var(--ambre-doux); color: var(--ambre); border-color: #f5d29a; }
.etiquette--non-publie { background: var(--fond); color: var(--encre-3); border-style: dashed; }
th .etiquettes { margin-top: .3rem; }
th .etiquettes .etiquette, th .etiquettes .pastille-statut { margin-top: 0; }
.pastille-statut--attente { background: var(--ambre-doux); color: var(--ambre); }
th .pastille-statut, th .etiquette { margin-top: .3rem; }
.actions-ligne form { margin: 0; }
.details-compacts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; margin: 0; font-size: .875rem; }
.details-compacts dt { color: var(--encre-3); }
.details-compacts dd { margin: 0; overflow-wrap: anywhere; }
.details-journal { font-size: .8rem; color: var(--encre-2); }
.panneau-droits { border: 1px solid var(--bord); border-radius: var(--rayon-moyen); padding: .75rem; margin-top: .5rem; background: var(--fond-doux); }
.fiche dt { font-weight: 600; color: var(--encre-2); font-size: .875rem; }
.fiche dd { margin: 0 0 .75rem; }
.liste-liens { list-style: none; padding: 0; }
.liste-liens a { display: flex; align-items: center; min-height: var(--cible); }

/* --- Saisie ------------------------------------------------------------------------------------- */
.avis-mobile { font-size: .875rem; color: var(--encre-3); background: var(--fond-gris); border-radius: var(--rayon-moyen); padding: .5rem .75rem; }
.bandeau-exercice { display: grid; gap: 1rem; align-items: center; }
.bandeau-exercice h1 { font-size: 1.3rem; }
.bandeau-exercice__actions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.segments { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--fond-gris); border-radius: var(--rayon-moyen); overflow-x: auto; max-width: 100%; }
.segment {
  display: inline-flex; align-items: baseline; gap: .35rem; min-height: var(--cible-2); padding: .45rem .9rem; border-radius: var(--rayon-petit);
  text-decoration: none; color: var(--encre-2); font-weight: 600; white-space: nowrap;
}
.segment[aria-current=page] { background: var(--fond); color: var(--encre); box-shadow: var(--ombre); }
.segment__detail { font-weight: 400; font-size: .8rem; color: var(--encre-3); }
.parametre-exercice { display: flex; flex-direction: column; gap: .3rem; border-radius: var(--rayon-moyen); }
.parametre-exercice label { font-weight: 600; font-size: .875rem; color: var(--encre-2); }
.champ-unite { display: flex; align-items: center; gap: .4rem; }
.champ-unite input { width: 7rem; text-align: right; }
.champ-unite span { color: var(--encre-3); }
.parametre-exercice.cellule--brouillon input { background: var(--brouillon); }
.progression {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem; margin: 0 0 1rem; padding: .85rem 1.1rem;
  border-radius: var(--rayon); background: var(--ambre-doux); border: 1px solid #f5d29a;
}
.progression p { margin: 0; }
.progression__titre { color: var(--encre-2); }
.progression__chiffre { font-size: 1.05rem; }
.progression__chiffre strong { font-size: 1.4rem; }
.progression .aide { flex-basis: 100%; margin: 0; }
.progression--complete { background: var(--vert-doux); border-color: var(--vert-bord); }
.onglets { display: flex; gap: .25rem; overflow-x: auto; padding: .25rem; margin-bottom: .75rem; background: var(--fond-gris); border-radius: var(--rayon-moyen); scrollbar-width: thin; }
.onglet {
  display: inline-flex; align-items: center; gap: .4rem; min-height: var(--cible-2); padding: 0 .9rem; white-space: nowrap; text-decoration: none;
  color: var(--encre-2); font-weight: 500; border-radius: var(--rayon-petit);
}
.onglet[aria-selected=true] { background: var(--fond); color: var(--encre); font-weight: 650; box-shadow: var(--ombre); }
.compteur {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem;
  border-radius: 999px; background: #f5d29a; color: var(--ambre); font-size: .75rem; font-weight: 700;
}
.panneau-onglet { margin-bottom: 1rem; }
.onglet--parametrage { margin-left: auto; }
/* Onglet « Tableau de synthèse » : il a son propre bouton, « Sauvegarder » (montants) ne le concerne pas. */
form[data-saisie]:has([data-panneau-affichage]:not([hidden])) .actions--collantes button[type=submit] { display: none; }
.affichage-synthese { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); align-items: start; }
.affichage-synthese__section { border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--fond); padding: .5rem .75rem .75rem; margin: 0; }
.affichage-synthese__section legend { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--encre-3); padding: 0 .25rem; }
.case-ligne { display: flex; align-items: center; gap: .5rem; min-height: var(--cible); }
.case-ligne label { font-weight: 400; display: inline; margin: 0; color: var(--encre); }
.case-ligne--gras label { font-weight: 650; }
.affichage-synthese__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.grille-defilement { overflow-x: auto; margin-bottom: 1rem; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--fond); }
.grille-defilement--compacte { display: inline-block; max-width: 100%; }
.grille { border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.grille th, .grille td { border-bottom: 1px solid var(--bord); padding: .3rem; white-space: nowrap; background: var(--fond); }
.grille tbody tr:last-child th, .grille tbody tr:last-child td { border-bottom: 0; }
.grille thead th { background: var(--fond-doux); color: var(--encre-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; text-align: center; padding: .55rem .3rem; }
.grille thead th.mois-courant { color: var(--ambre); background: var(--ambre-doux); }
.grille tbody th { text-align: left; font-weight: 500; white-space: normal; min-width: 12rem; padding-left: .75rem; }
.col-figee { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--bord); }
.grille .unite { color: var(--encre-3); text-align: center; font-size: .8rem; }
.grille input { width: 7.25rem; min-height: 38px; text-align: right; padding: .3rem .5rem; border-color: var(--bord); border-radius: var(--rayon-petit); font-variant-numeric: tabular-nums; }
.grille .cellule--brouillon input { background: var(--brouillon); border-color: #ead77a; }
.grille .cellule--a-saisir input { border: 1.5px dashed #d99a2b; background: #fffdf7; }
.grille .cellule--erreur input { border: 2px solid var(--rouge); }
.grille .mensualise, .grille .calcule { text-align: right; color: var(--encre-3); padding-right: .75rem; font-variant-numeric: tabular-nums; }
.ligne-calculee th { font-style: italic; color: var(--encre-2); }
.ligne-erreur td { white-space: normal; padding: .5rem .75rem; }
.titre-tableau { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); margin: .75rem 0 .5rem; }
/* Page de configuration des relances */
.relances-config { max-width: 44rem; }
/* En-tête repliable (summary) d'une section de relance : titre + état, description dessous. */
.relance-carte > summary { align-items: flex-start; padding-top: .75rem; padding-bottom: .75rem; }
.relance-sommaire { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.relance-sommaire__titre { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.relance-sommaire__desc { font-size: .85rem; color: var(--encre-3); }
.section-repliable__contenu > .bascule { margin-bottom: 1rem; }
.bascule { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--cible); font-weight: 600; color: var(--encre-2); white-space: nowrap; cursor: pointer; }
.bascule span { user-select: none; }
.relance-horaire { border: 0; margin: 0 0 .25rem; padding: .7rem .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; background: var(--fond-doux); border-radius: var(--rayon-moyen); color: var(--encre-2); }
.champ-nombre { display: inline-flex; }
.champ-nombre input { width: 3.75rem; text-align: center; min-height: var(--cible-2); padding: .3rem .4rem; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); font-variant-numeric: tabular-nums; }
.champ-nombre--erreur input { border: 2px solid var(--rouge); }
.relance-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; }
.corps-defaut { white-space: pre-wrap; background: var(--fond-doux); border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: .75rem; font-family: inherit; font-size: .85rem; margin: .5rem 0 0; }
.ajout-taxe { max-width: 34rem; margin: 0 0 1rem; }
.ajout-taxe label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; color: var(--encre-2); }
.ajout-taxe__ligne { display: flex; gap: .5rem; }
.section-repliable { border: 1px solid var(--bord); border-radius: var(--rayon); margin-bottom: 1rem; background: var(--fond); box-shadow: var(--ombre); }
.section-repliable summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.25rem; }
.section-repliable summary h2 { margin: 0; font-size: 1.05rem; display: inline; }
.section-repliable__contenu { padding: 0 1.25rem 1rem; }

/* Volets repliables : le marqueur natif disparaît en display:flex, on dessine un chevron
   (à droite du titre pour les sections, à gauche du libellé pour « Voir les données »). */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.section-repliable summary::after, .donnees summary::before {
  content: ""; flex: none; width: .5rem; height: .5rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.section-repliable summary::after { margin-right: .25rem; color: var(--encre-3); }
.section-repliable[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.donnees summary::before { margin: 0 .2rem 0 .1rem; transform: rotate(-45deg); }
.donnees[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.dialogue { border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; background: var(--fond); margin: 1rem 0; box-shadow: var(--ombre-forte); }

/* --- Tableau de bord ---------------------------------------------------------------------------------- */
.bandeau-apercu {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1rem; margin: 0 0 1rem;
  border-radius: var(--rayon); background: var(--ambre-doux); border: 1px dashed #d99a2b; color: var(--ambre);
}
.bandeau-apercu span { color: var(--encre-2); font-size: .9rem; }
.bandeau-apercu__actions { display: flex; gap: .5rem; margin-left: auto; }
.tdb-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin: .25rem 0 1rem; }
.tdb-entete__retour:empty { display: none; }
.tdb-entete__retour { flex-basis: 100%; }
.tdb-contexte { min-width: 0; }
.tdb-contexte h1 { font-size: 1.35rem; }
.tdb-contexte p { margin: 0; color: var(--encre-3); }
/* Pages du TdB : onglets soulignés, numérotés et centrés. Volontairement distincts des sélecteurs
   segmentés sur fond gris (« Mois par mois / Tableau complet », mois) de la synthèse. */
.onglets-tdb {
  display: flex; gap: .25rem; margin: 0 0 1.5rem; padding: 0 .25rem; overflow-x: auto; scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--bord);  /* filet de base, sous le soulignement de l'onglet actif */
}
.onglets-tdb::-webkit-scrollbar { display: none; }
/* Centrage par marges automatiques : contrairement à justify-content, le début reste accessible au défilement. */
.onglet-tdb:first-child { margin-left: auto; }
.onglet-tdb:last-child { margin-right: auto; }
.onglet-tdb {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .5rem; min-height: var(--cible); padding: 0 1rem;
  border-bottom: 3px solid transparent; color: var(--encre-3); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.onglet-tdb__numero {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--fond-gris); color: var(--encre-3); font-size: .75rem; font-weight: 700; transition: background .15s, color .15s;
}
.onglet-tdb:hover { color: var(--encre); border-bottom-color: var(--bord-fort); }
.onglet-tdb[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); }
.onglet-tdb[aria-current=page] .onglet-tdb__numero { background: var(--accent); color: #fff; }
.page-tdb { touch-action: pan-y; }

.cartes-kpi { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.carte-kpi { background: var(--fond); border: 1px solid var(--bord); border-left: 4px solid var(--vert); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.15rem; }
.carte-kpi__titre { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--encre-3); font-weight: 600; margin: 0; }
.carte-kpi__valeur { font-size: 1.65rem; font-weight: 700; letter-spacing: -.01em; margin: .2rem 0 .5rem; font-variant-numeric: tabular-nums; }
.carte-kpi__comparaison { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--bord); }
.carte-kpi__n1 { color: var(--encre-3); font-size: .9rem; }
.carte-kpi__n1 strong { color: var(--encre-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.evolution {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px;
  font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.evolution__icone { display: block; flex: none; width: .65rem; height: .65rem; }
.evolution--hausse { background: var(--vert-doux); color: var(--vert-fonce); }
.evolution--baisse { background: var(--rouge-doux); color: var(--rouge-fonce); }
.evolution--baisse .evolution__icone { transform: rotate(180deg); }

.deux-colonnes { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.graphique { background: var(--fond); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem; margin: 0 0 1rem; min-width: 0; }
.graphique figcaption { font-weight: 650; margin-bottom: .75rem; }
.graphique__zone { position: relative; height: 220px; width: 100%; }
.graphique--large .graphique__zone { height: 250px; }
.legende-chiffree { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .875rem; color: var(--encre-2); }
.donnees summary { cursor: pointer; min-height: var(--cible); display: inline-flex; align-items: center; gap: .5rem; padding: 0 .25rem; color: var(--accent-fonce); font-size: .9rem; font-weight: 600; }
.note-comptable { margin-top: 1rem; padding: 1rem 1.15rem; border-radius: var(--rayon); background: var(--fond-doux); border: 1px solid var(--bord); }
.note-comptable__titre { font-size: .9rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.note-comptable p { margin: 0; }
.note-comptable form { margin: 0; }
.note-comptable__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .5rem; }
.publie-le { color: var(--encre-3); font-size: .8rem; text-align: right; }

/* Synthèse : tableau mois par mois (boutons de mois) ou tableau complet, sans effet de couleur */
.synthese-commandes { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: .75rem; }
.boutons-mois, .vues-synthese {
  display: flex; gap: .25rem; padding: .25rem; background: var(--fond-gris); border-radius: var(--rayon-moyen);
  overflow-x: auto; max-width: 100%; scrollbar-width: none; flex: 0 1 auto;
}
.boutons-mois::-webkit-scrollbar, .vues-synthese::-webkit-scrollbar { display: none; }
.bouton-mois {
  flex: 0 0 auto; min-height: var(--cible-2); padding: 0 .9rem; border: 0; border-radius: var(--rayon-petit); background: transparent;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--encre-2); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.bouton-mois:hover { color: var(--encre); background: rgba(255, 255, 255, .6); }
.bouton-mois[aria-pressed=true] { background: var(--fond); color: var(--encre); box-shadow: var(--ombre); }
.synthese--mois { max-width: 52rem; }
.synthese--mois td, .synthese--mois th[scope=col] { width: 9.5rem; }
.synthese--mois thead th:first-child, .synthese--mois tbody th[scope=row] { width: auto; }

.synthese { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: 100%; font-variant-numeric: tabular-nums; }
.synthese th, .synthese td { border-bottom: 1px solid var(--bord); padding: .4rem .65rem; text-align: right; white-space: nowrap; background: var(--fond); }
.synthese thead th {
  position: sticky; top: 0; z-index: 3; color: var(--encre); background: var(--fond); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; border-bottom: 2px solid var(--encre); padding-top: .6rem; padding-bottom: .5rem;
}
.synthese thead th:first-child { text-align: left; }
/* Filets verticaux entre les colonnes (la 1re colonne a déjà sa bordure, .col-figee) */
.synthese td + td, .synthese thead th:nth-child(n+3) { border-left: 1px solid var(--bord); }
.synthese tbody th[scope=row] { text-align: left; font-weight: 400; white-space: normal; min-width: 13rem; color: var(--encre-2); }
/* Bandeau rouge BDL en tête de chaque section (Chiffre d'affaires, Marge…) */
.synthese .synthese__section th {
  text-align: left; background: var(--accent); color: #fff; font-weight: 700; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; padding: .4rem .65rem; border-bottom: 0;
}
.synthese tbody:not(:first-of-type) .synthese__section th { border-top: .6rem solid var(--fond); }
/* Le titre du bandeau reste visible quand on fait défiler le tableau vers la droite */
.synthese .synthese__section th > span { position: sticky; left: .65rem; display: inline-block; }
/* Totaux : gras, séparés par un filet */
.synthese .ligne-gras th, .synthese .ligne-gras th[scope=row], .synthese .ligne-gras td { font-weight: 700; color: var(--encre); border-top: 1px solid var(--bord-fort); }
/* Taux et évolutions : lignes grisées, plus discrètes */
.synthese .ligne-taux th, .synthese .ligne-taux th[scope=row], .synthese .ligne-taux td { background: var(--fond-gris); color: var(--encre-3); font-size: .8rem; }
.synthese .ligne-taux th[scope=row] { font-style: italic; }
.synthese .ligne-evolution .hausse { color: var(--vert-fonce); font-weight: 600; }
.synthese .ligne-evolution .baisse { color: var(--rouge); font-weight: 600; }
/* Colonne de total : légèrement teintée et en gras */
.synthese .total { border-left: 1px solid var(--bord-fort); font-weight: 700; background: var(--fond-doux); }
.synthese .ligne-taux .total { background: #e9e8e8; }
.synthese .ratio { color: var(--encre-3); }
.synthese-defilement { overflow-x: auto; border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.synthese-bloc .synthese-defilement { display: inline-block; max-width: 100%; vertical-align: top; }
.synthese-bloc [data-vue-synthese="complete"] .synthese-defilement { display: block; }

/* Analyse par période : périodicité, droite temporelle à deux curseurs (A et, en comparatif, B) */
.js .sans-js { display: none !important; }
.analyse-periode { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1.5rem; margin-bottom: .5rem; }
.analyse-periode__affichage { display: flex; flex-direction: column; gap: .25rem; min-width: 13rem; }
.analyse-periode__affichage label, .frise legend { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--encre-3); }
.analyse-periode__frises { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.analyse-periode__resume { color: var(--encre-2); font-size: .9rem; margin: .25rem 0 .6rem; }
.frise { border: 0; margin: 0; padding: 0; min-width: 0; }
.frise legend { padding: 0; margin-bottom: .25rem; }
.frise__choix { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.frise__choix label { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.frise__curseurs { --pouce: 26px; position: relative; height: 5.25rem; margin: 0 1.5rem; }  /* marge : bulles des extrémités */
.frise__piste { position: absolute; left: 0; right: 0; top: 2.35rem; height: 6px; border-radius: 3px; background: var(--bord); }
.frise__plage {
  position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--vert);
  left: calc(var(--pouce) / 2 + var(--p-debut, 0) * (100% - var(--pouce)));
  right: calc(var(--pouce) / 2 + (1 - var(--p-fin, 1)) * (100% - var(--pouce)));
}
.frise__bulle {
  position: absolute; top: 0; transform: translateX(-50%); padding: .15rem .45rem; border-radius: 6px;
  background: var(--encre); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; pointer-events: none;
  left: calc(var(--pouce) / 2 + var(--p, 0) * (100% - var(--pouce)));
}
.frise__curseur {
  position: absolute; left: 0; top: calc(2.35rem + 3px - var(--pouce) / 2); width: 100%; height: var(--pouce); margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.frise__curseur:focus { outline: none; }
.frise__curseur::-webkit-slider-runnable-track { height: var(--pouce); background: none; }
.frise__curseur::-moz-range-track { height: var(--pouce); background: none; }
.frise__curseur::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; width: var(--pouce); height: var(--pouce); border-radius: 50%;
  background: var(--fond); border: 2px solid var(--vert); box-shadow: var(--ombre); cursor: grab;
}
.frise__curseur::-moz-range-thumb {
  pointer-events: auto; width: var(--pouce); height: var(--pouce); box-sizing: border-box; border-radius: 50%;
  background: var(--fond); border: 2px solid var(--vert); box-shadow: var(--ombre); cursor: grab;
}
.frise__curseur:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.frise__curseur:focus-visible::-moz-range-thumb { outline: 3px solid var(--focus); outline-offset: 2px; }
.frise__curseur--dessus { z-index: 1; }
.frise__graduations { position: absolute; left: 0; right: 0; top: 3.3rem; margin: 0; padding: 0; list-style: none; }
.frise__graduations li {
  position: absolute; height: .45rem; border: 1px solid var(--bord-fort); border-top: 0; min-width: 2px;
  left: calc(var(--pouce) / 2 + var(--p-debut, 0) * (100% - var(--pouce)));
  width: calc((var(--p-fin, 1) - var(--p-debut, 0)) * (100% - var(--pouce)));
}
.frise__graduations span {
  position: absolute; top: .55rem; left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--encre-3); white-space: nowrap;
}
.entete-detail { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .7rem; }

/* Téléphone : montants arrondis à l'euro dans le tableau du mois pour tenir sans défilement */
@media (max-width: 599px) {
  .synthese--mois { font-size: .8rem; }
  .synthese--mois th, .synthese--mois td { padding: .45rem .4rem; }
  .synthese--mois tbody th[scope=row] { min-width: 0; }
  .synthese--mois .total { display: none; }
  .synthese-bloc .synthese-defilement { display: block; }
  .synthese--mois td, .synthese--mois th[scope=col] { width: auto; }
  .vues-synthese { width: 100%; }
  .vues-synthese .bouton-mois { flex: 1 0 auto; padding: 0 .55rem; font-size: .85rem; }
  .synthese--periode { font-size: .8rem; }
  .synthese--periode tbody th[scope=row] { min-width: 9rem; }
  .analyse-periode__affichage { width: 100%; }
}

/* Tableaux d'administration : lignes empilées en cartes sur téléphone */
@media (max-width: 599px) {
  .tableau--empile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau--empile, .tableau--empile tbody, .tableau--empile tr, .tableau--empile th, .tableau--empile td { display: block; width: 100%; }
  .tableau--empile tr { padding: .85rem 1rem; border-bottom: 1px solid var(--bord); }
  .tableau--empile tbody tr:last-child { border-bottom: 0; }
  .tableau--empile th, .tableau--empile td { border: 0; padding: .2rem 0; white-space: normal; }
  .tableau--empile td[data-libelle]::before {
    content: attr(data-libelle); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); margin-top: .35rem;
  }
  .tableau--empile .cellule-actions { width: 100%; padding-top: .6rem; }
  .tableau--empile .actions-ligne { justify-content: flex-start; }
}

/* --- Points de rupture ------------------------------------------------------------------------------------ */
@media (min-width: 600px) {
  .cellule-actions .actions-ligne { flex-wrap: nowrap; }
  .cartes-kpi { grid-template-columns: repeat(3, 1fr); }
  .grille-formulaire { grid-template-columns: 1fr 1fr; }
  .grille-cartes { grid-template-columns: repeat(2, 1fr); }
  .contenu { padding: 1.25rem 1.5rem; }
  .actions--collantes { margin: 1rem -1.5rem 0; padding: .75rem 1.5rem; }
}

@media (min-width: 900px) {
  html { font-size: 14px; }
  :root { --cible: 36px; --cible-2: 32px; --cible-petite: 30px; }
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea { font-size: 1rem; }
  .synthese tbody th[scope=row] { min-width: 18rem; }
  /* Volets figés (comme dans Excel) : mois en haut, libellés à gauche, totaux à droite.
     Le tableau défile dans son cadre, limité à la hauteur de l'écran. */
  .synthese-defilement { max-height: calc(100vh - 6.5rem); overflow: auto; }
  .synthese thead .col-figee, .synthese thead .fige-droite { z-index: 4; }
  .synthese .fige-droite { position: sticky; right: 0; z-index: 2; }
  .synthese .fige-droite--2 { right: 6.5rem; }  /* à gauche de la colonne € / % */
  .synthese .ratio { width: 6.5rem; min-width: 6.5rem; }
  .synthese .col-figee { box-shadow: 1px 0 0 var(--bord-fort); }
  .synthese .fige-droite.total { box-shadow: -1px 0 0 var(--bord-fort); }
  .seulement-large { display: flex !important; }
  .marque-entete__logo { height: 46px; }
  .seulement-mobile { display: none !important; }
  .js .entete__bouton-menu { display: none; }
  .entete__menu, .js .entete__menu { display: block; width: auto; }
  .entete__menu ul { flex-direction: row; align-items: center; padding: 0; }
  .lien-nav { width: auto; }
  .avis-mobile { display: none; }
  .deux-colonnes { grid-template-columns: 1fr 1fr; }
  .graphique__zone { height: 230px; }
  .graphique--large .graphique__zone { height: 270px; }
  .bandeau-exercice { grid-template-columns: 1fr auto auto; }
  .bandeau-exercice__actions { grid-column: 1 / -1; }
}

@media (min-width: 1200px) {
  h1 { font-size: 1.45rem; }
  .grille-cartes { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .entete, .barre-outils, .onglets-tdb, .tdb-entete .barre-outils__liens, .actions { display: none !important; }
  .page-tdb[hidden] { display: block !important; }
}
