/* Arcadia Dashboard — feuille unique.
   La palette vient du logo : trait d'encre, ruban rose poudré.
   Les couleurs de graphique (--serie-*) ont passé les six contrôles du
   validateur (bande de clarté, chroma, séparation daltonienne, contraste). */

:root {
  /* Encre */
  --ink:        #191520;
  --ink-2:      #403948;
  --muted:      #6B6370;

  /* Marque — le rose du ruban */
  --rose:       #D9C9D7;
  --rose-pale:  #F5EFF4;
  --rose-600:   #A96E86;
  --rose-700:   #8E5A71;
  --rose-800:   #74475B;

  /* Surfaces */
  --bg:         #FBF9FA;
  --surface:    #FFFFFF;
  --surface-2:  #F6F2F5;
  --border:     #E8E2E6;
  --border-2:   #D6CCD2;

  /* États */
  --pos:        #2E7D52;
  --pos-pale:   #EAF3EE;
  --neg:        #A8443F;
  --neg-pale:   #FBEDEC;
  --warn:       #8A5F1B;
  --warn-pale:  #FDF4E6;

  /* Séries de graphique — ordre fixe, jamais recyclé */
  --serie-ca:    #B03A6E;
  --serie-frais: #B8860B;
  --serie-nette: #2E7D52;
  /* Meme teinte, delavee : un mois incomplet garde son identite de serie sans
     se lire comme un mauvais mois. */
  --serie-nette-faible: #A8CDB7;

  --radius:    14px;
  --radius-sm: 10px;
  --ombre:     0 1px 2px rgba(25,21,32,.05), 0 10px 28px -16px rgba(25,21,32,.18);
  --ombre-sm:  0 1px 2px rgba(25,21,32,.06);

  --t: 180ms cubic-bezier(.2,.6,.3,1);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* L'attribut hidden ne vaut que `display: none` par defaut, et toute regle de
   display le bat : .heros est en `display: grid`, donc la vue masquee restait
   affichee. !important ici est le seul endroit ou il est legitime. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  /* Les chiffres doivent s'aligner d'une ligne à l'autre dans les tableaux. */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--rose-700);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── En-tête ──────────────────────────────────────────────────────────── */

.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,249,250,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.entete-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px max(14px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 12px;
}

.marque { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.marque img { border-radius: 50%; display: block; }
.marque-nom {
  font: 600 23px/1 var(--serif);
  letter-spacing: .14em; text-transform: uppercase;
}

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-lien {
  display: inline-flex; align-items: center; gap: 7px;
  /* 44px de haut : la cible tactile minimale, pas une suggestion. */
  min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: 14px;
  transition: background var(--t), color var(--t);
}
.nav-lien svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-lien:hover { background: var(--surface-2); color: var(--ink); }
.nav-lien.est-actif { background: var(--rose-pale); color: var(--rose-800); }

.compte { position: relative; flex-shrink: 0; }
.bouton-compte {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
  min-height: 40px; padding: 0 10px; border-radius: 999px; color: var(--muted);
  transition: background var(--t), color var(--t);
}
.bouton-compte::-webkit-details-marker { display: none; }
.bouton-compte:hover, .compte[open] .bouton-compte { background: var(--surface-2); color: var(--ink); }
.bouton-compte:focus-visible { outline: 2px solid var(--rose-700); outline-offset: 2px; }
.bouton-compte svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.bouton-compte .chevron { width: 14px; height: 14px; transition: transform var(--t); }
.compte[open] .chevron { transform: rotate(180deg); }

.menu-panneau {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: min(340px, calc(100vw - 32px)); padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--ombre); display: grid; gap: 10px;
}
.menu-titre { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-actions:empty, .menu-sujets:empty { display: none; }
.menu-sujets { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-sujet {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px; margin: 0 -8px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.menu-sujet:hover { background: var(--surface-2); }
.menu-sujet input { margin-top: 2px; accent-color: var(--rose-700); flex-shrink: 0; }
.menu-sujet strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.menu-sujet small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.menu-lien {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 10px 8px 0; margin: 0 -8px;
  border-top: 1px solid var(--border); color: var(--ink-2); text-decoration: none; font-size: 14px;
}
.menu-lien:hover { color: var(--neg); }
.menu-lien svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compte-nom { font-size: 13px; color: var(--muted); max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bouton-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted);
  transition: background var(--t), color var(--t);
}
.bouton-icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bouton-icone:hover { background: var(--surface-2); color: var(--ink); }

/* ── Page ─────────────────────────────────────────────────────────────── */

.page {
  max-width: 1200px; margin: 0 auto;
  padding: 18px max(14px, env(safe-area-inset-left))
           calc(32px + env(safe-area-inset-bottom));
}

.titre-page { font: 500 30px/1.1 var(--serif); letter-spacing: .01em; }
.sous-titre { color: var(--muted); font-size: 14px; margin-top: 4px; }

.carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--ombre-sm);
}

.section { margin-top: 22px; }
.section-titre {
  font: 500 20px/1.2 var(--serif); letter-spacing: .02em;
  margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.section-note { font-size: 12.5px; color: var(--muted); font-family: var(--sans); }

/* ── Boutons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 14px; cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.btn:hover { background: var(--surface-2); border-color: var(--rose-600); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-principal {
  background: var(--rose-700); border-color: var(--rose-700); color: #fff;
}
.btn-principal:hover { background: var(--rose-800); border-color: var(--rose-800); }

.btn-danger { color: var(--neg); border-color: #E7C9C7; }
.btn-danger:hover { background: var(--neg-pale); border-color: var(--neg); }

.btn-petit { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* ── Sélecteur de période ─────────────────────────────────────────────── */

.barre-filtres {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 14px;
}

.segmente {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px;
}
.segmente button {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer;
  transition: background var(--t), color var(--t);
}
.segmente button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--ombre-sm);
}

.champ-select, .champ {
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.champ-select { padding-right: 32px; cursor: pointer; }

/* ── Tuiles ───────────────────────────────────────────────────────────── */

.heros { display: grid; gap: 12px; margin-top: 16px; }

.tuile-hero {
  position: relative; overflow: hidden;
  padding: 20px 22px 22px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--rose-pale) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--ombre);
}
.tuile-hero::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--serie-nette);
}
.tuile-hero .tuile-label { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tuile-hero .tuile-valeur { font: 600 clamp(34px, 9vw, 46px)/1.05 var(--sans); margin-top: 6px; letter-spacing: -.02em; }

.grille-tuiles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Les deux seuls nombres sur lesquels on agit : ils doivent dominer la page
   avant toute lecture, et se distinguer l'un de l'autre au premier coup d'oeil. */
.duo { display: grid; gap: 12px; margin-top: 16px; }

.tuile-action {
  position: relative; overflow: hidden;
  padding: 22px 22px 20px;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--ombre);
}
.tuile-action::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 5px;
}
.tuile-action .tuile-label {
  font-size: 13px; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 600; color: var(--muted);
}
.tuile-action .tuile-valeur {
  font: 600 clamp(32px, 8.5vw, 44px)/1.05 var(--sans);
  margin-top: 6px; letter-spacing: -.02em;
}
.tuile-action .tuile-unite {
  font-size: 15px; font-weight: 500; color: var(--ink-2); margin-top: 2px;
}
.tuile-action .tuile-pied { margin-top: 10px; }

.tuile-garder { background: linear-gradient(135deg, var(--surface) 0%, var(--warn-pale) 100%); }
.tuile-garder::before { background: var(--warn); }
.tuile-verser { background: linear-gradient(135deg, var(--surface) 0%, var(--pos-pale) 100%); }
.tuile-verser::before { background: var(--pos); }

.tuile {
  padding: 14px 15px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--ombre-sm);
  display: flex; flex-direction: column; gap: 3px;
}
.tuile-label {
  font-size: 12px; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
/* Pastille d'identité : la couleur de série vit ici, jamais sur le texte. */
.pastille { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.pastille-ca    { background: var(--serie-ca); }
.pastille-frais { background: var(--serie-frais); }
.pastille-nette { background: var(--serie-nette); }
.pastille-brute { background: var(--ink-2); }

.tuile-valeur { font-size: 23px; font-weight: 600; letter-spacing: -.015em; }
.tuile-pied { font-size: 12px; color: var(--muted); min-height: 17px; }

/* Variation : jamais la couleur seule — une flèche porte aussi le sens. */
.variation { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.variation svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.variation.hausse { color: var(--pos); }
.variation.baisse { color: var(--neg); }
.variation.plate  { color: var(--muted); }

/* ── Graphiques ───────────────────────────────────────────────────────── */

.bloc-graphe { padding: 16px; }
.toile { position: relative; height: 300px; }
.toile canvas { width: 100% !important; }

.legende { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legende-item { display: inline-flex; align-items: center; gap: 7px; }

/* ── Tableaux ─────────────────────────────────────────────────────────── */

/* Le tableau déborde dans SON conteneur, jamais la page. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

details.repli > summary {
  cursor: pointer; padding: 14px 16px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; list-style: none; min-height: 44px;
}
details.repli > summary::-webkit-details-marker { display: none; }
details.repli > summary::after {
  content: ''; width: 7px; height: 7px; margin-left: auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform var(--t);
}
details.repli[open] > summary::after { transform: rotate(-135deg); }

/* ── Messages ─────────────────────────────────────────────────────────── */

.alerte {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 14px; border: 1px solid;
}
.alerte svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alerte a { font-weight: 600; }
.alerte-info   { background: var(--rose-pale); border-color: var(--rose); color: var(--rose-800); }
.alerte-warn   { background: var(--warn-pale); border-color: #E8D3AC; color: var(--warn); }
.alerte-erreur { background: var(--neg-pale);  border-color: #E7C9C7; color: var(--neg); }
.alerte-ok     { background: var(--pos-pale);  border-color: #C4DDCE; color: var(--pos); }

.mention {
  font-size: 12.5px; color: var(--muted); line-height: 1.55;
  margin-top: 18px; padding: 12px 14px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-2);
}

/* ── Squelettes de chargement ─────────────────────────────────────────── */

/* L'espace est réservé avant l'arrivée des données : la page ne saute pas
   quand Odoo répond (c'est le CLS qu'on évite, pas une décoration). */
.squelette {
  background: linear-gradient(90deg, var(--surface-2) 25%, #EDE7EB 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: glisse 1.4s infinite;
  border-radius: 6px; color: transparent !important;
}
@keyframes glisse { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── Connexion ────────────────────────────────────────────────────────── */

.ecran-login {
  min-height: 100svh;
  /* Flex et non grid : une piste de grille en minmax(0, 390px) est de taille
     FIXE, elle garde ses 390 px dans un conteneur de 358 px et déborde. Un
     élément flex en width:100% se mesure sur la boîte de contenu du parent,
     padding déduit, et max-width ne le fait pas grandir. */
  display: flex; align-items: center; justify-content: center;
  padding: 24px max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(1100px 520px at 50% -10%, var(--rose-pale), transparent 70%),
    var(--bg);
}
.boite-login { width: 100%; max-width: 390px; text-align: center; }
.boite-login img { width: 96px; height: 96px; border-radius: 50%; }
.boite-login h1 {
  font: 500 34px/1.1 var(--serif); letter-spacing: .18em;
  text-transform: uppercase; margin: 16px 0 4px;
}
.boite-login p.accroche { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

.formulaire { display: grid; gap: 12px; text-align: left; }
.libelle { font-size: 13px; font-weight: 500; color: var(--ink-2); display: block; margin-bottom: 5px; }
.champ {
  width: 100%; background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t);
}
/* Safari iOS donne aux champs date une largeur minimale propre, qui ignore
   width:100% et déborde de la colonne, et centre la valeur. */
input[type="date"].champ { -webkit-appearance: none; appearance: none; min-width: 0; display: block; line-height: 42px; }
input[type="date"].champ::-webkit-date-and-time-value { text-align: left; }
.champ:focus { border-color: var(--rose-700); box-shadow: 0 0 0 3px rgba(142,90,113,.15); outline: none; }
textarea.champ { min-height: 120px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; resize: vertical; }

/* ── Onglets admin ────────────────────────────────────────────────────── */

.onglets {
  display: flex; gap: 2px; overflow-x: auto; margin: 16px 0 18px;
  border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  flex-shrink: 0; min-height: 44px; padding: 0 16px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.onglet:hover { color: var(--ink); }
.onglet[aria-selected="true"] { color: var(--rose-800); border-bottom-color: var(--rose-700); }

.panneau[hidden] { display: none !important; }

.pile { display: grid; gap: 14px; }
.ligne-champs { display: grid; gap: 12px; grid-template-columns: 1fr; }

.etiquette {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
}
.etiquette-admin   { background: var(--rose-pale); color: var(--rose-800); }
.etiquette-user    { background: var(--surface-2); color: var(--muted); }
.etiquette-bloque  { background: var(--neg-pale); color: var(--neg); }

/* ── Facture ──────────────────────────────────────────────────────────── */

/* Masqué à l'œil mais pas au clavier ni au lecteur d'écran : un input file en
   display:none ne recevrait plus le focus via son label. */
.cache-visuel {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.depot {
  margin-top: 16px; padding: 28px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  border: 2px dashed var(--border-2); background: var(--surface);
  transition: border-color var(--t), background var(--t);
}
.depot.survol { border-color: var(--rose-700); background: var(--rose-pale); }
.depot-icone { width: 34px; height: 34px; fill: none; stroke: var(--rose-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.depot-texte { margin: 0; font-weight: 500; }
.depot-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.depot-actions label { cursor: pointer; }
.depot-actions label:focus-within { outline: 2px solid var(--rose-700); outline-offset: 2px; }

/* L'appareil photo n'a de sens qu'au doigt : c'est le pointeur qui décide,
   comme pour la taille des commandes, jamais l'userAgent. */
@media (pointer: fine) { .choix-photo { display: none; } }

.formulaire-facture { margin-top: 16px; padding: 16px; }
.fichier-choisi {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink-2);
}
.fichier-choisi span { min-width: 0; overflow-wrap: anywhere; flex: 1; }

/* Le TTC est le seul montant qui part en comptabilité. */
.champ-ttc .champ { border-color: var(--rose-700); font-weight: 600; font-size: 17px; }

.a-verifier .champ { border-color: var(--warn); background: var(--warn-pale); }
.a-verifier .libelle::after { content: ' — non détecté'; color: var(--warn); font-weight: 600; }

.actions-alerte { display: block; margin-top: 8px; }

/* ── Attestations ─────────────────────────────────────────────────────── */

.grille-tuiles.resume-att { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .grille-tuiles.resume-att { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.filtre-doute { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); align-self: end; min-height: 44px; cursor: pointer; }

.table-att td { vertical-align: middle; }
.table-att .champ-client { min-width: 230px; width: 100%; }
.table-att .nom-kq { color: var(--muted); }
.table-att .etat .btn { margin-left: 6px; }
/* Une ligne douteuse se repère sans lire le badge : fond et filet latéral. */
.ligne-doute td { background: var(--warn-pale); }
.ligne-doute td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ligne-doute .champ-client { border-color: var(--warn); }
.ligne-doublon td { color: var(--muted); }
.ligne-doublon .champ-client { background: var(--surface-2); }

.etiquette-doute { background: var(--warn-pale); color: var(--warn); border: 1px solid #E8D3AC; }
.etiquette-ok    { background: var(--pos-pale); color: var(--pos); }

/* ── Points de rupture ────────────────────────────────────────────────── */

@media (min-width: 560px) {
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ligne-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compte-nom { max-width: none; }
}

@media (min-width: 900px) {
  .page { padding: 26px 20px 48px; }
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heros { grid-template-columns: 1fr 2fr; align-items: stretch; }
  .heros .grille-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grille-tuiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .toile { height: 340px; }
  .ligne-champs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Sur téléphone, la colonne « Type » repousse le montant hors de l'écran alors
   que la pastille colorée devant le libellé dit déjà produit ou charge. */
@media (max-width: 560px) {
  .col-type { display: none; }
}

/* Téléphone (portrait comme paysage) : l'en-tête ne garde que des icônes. Le
   logo dit la marque, chaque icône dit sa page. Les libellés restent lisibles
   par un lecteur d'écran — en display:none, les liens perdraient leur nom. */
@media (max-width: 640px) {
  .marque-nom, .compte-nom { display: none; }
  .entete-inner { gap: 8px; }
  .nav-lien { padding: 0 12px; }
  .nav-lien svg { width: 20px; height: 20px; }
  .nav-lien span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* Écran tactile : toute commande fait au moins 44 px de haut. Sur un pointeur
   fin, les boutons compacts restent compacts — c'est le doigt qui impose la
   taille, pas la largeur de l'écran (une tablette large se touche aussi). */
@media (pointer: coarse) {
  .btn, .btn-petit, .segmente button, .marque, .onglet, .bouton-compte, .menu-lien { min-height: 44px; }
  .segmente button { padding: 0 18px; }
  input[type="checkbox"] { width: 22px; height: 22px; }
}

@media print {
  .entete, .barre-filtres, .btn { display: none; }
  .carte { box-shadow: none; }
}
