/* Catalogue SARL LANGE — couleurs reprises du logo (bleu nuit, bleu goutte, jaune éclair). */
:root {
  --nuit: #12355b;
  --nuit-2: #0c2742;
  --goutte: #1aa3dc;
  --eclair: #f1e33b;
  --fond: #f4f6f8;
  --carte: #ffffff;
  --texte: #1c2733;
  --doux: #5d6b7a;
  --trait: #dde3e9;
  --ok: #1f8a4c;
  --alerte: #b4580a;
  --danger: #b3261e;
  --rayon: 10px;
  --ombre: 0 1px 2px rgba(18, 53, 91, .06), 0 4px 14px rgba(18, 53, 91, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--nuit); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
.enveloppe { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.doux { color: var(--doux); }
.petit { font-size: .85rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* En-tête public */
.entete { background: #fff; border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 20; }
.entete > .enveloppe { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo img { height: 40px; display: block; }
.recherche { flex: 1; display: flex; max-width: 560px; }
.recherche input {
  flex: 1; min-width: 0; font: inherit; padding: 10px 14px; border: 1.5px solid var(--trait);
  border-right: 0; border-radius: 8px 0 0 8px; background: var(--fond);
}
.recherche input:focus { outline: none; border-color: var(--goutte); background: #fff; }
.recherche button {
  font: inherit; font-weight: 600; border: 0; background: var(--nuit); color: #fff;
  padding: 0 18px; border-radius: 0 8px 8px 0; cursor: pointer;
}
.entete .tel { margin-left: auto; text-align: right; white-space: nowrap; font-weight: 600; text-decoration: none; }
.entete .tel small { display: block; font-weight: 500; color: var(--doux); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.rayons { background: var(--nuit); }
.rayons .enveloppe { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.rayons a {
  color: #dfe9f3; text-decoration: none; font-size: .8rem; font-weight: 500; white-space: nowrap;
  padding: 10px 12px; border-bottom: 3px solid transparent;
}
.rayons a:hover, .rayons a.actif { color: #fff; border-bottom-color: var(--eclair); }

/* Accueil */
.bandeau { background: linear-gradient(120deg, var(--nuit) 0%, var(--nuit-2) 100%); color: #fff; }
.bandeau .enveloppe { padding: 40px 16px 44px; display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; align-items: center; }
.bandeau h1 { font-size: 2rem; margin-bottom: .3em; }
.bandeau h1 span { color: var(--eclair); }
.bandeau p { color: #c9d8e8; margin: 0 0 1.2em; max-width: 52ch; }
.bandeau .chiffres { display: flex; gap: 28px; }
.bandeau .chiffres b { display: block; font-size: 1.5rem; color: #fff; }
.bandeau .chiffres span { font-size: .8rem; color: #a9bdd2; }
.bandeau .joindre { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--rayon); padding: 18px 20px; }
.bandeau .joindre a { color: #fff; }
.grille-rubriques { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 28px 0 40px; }
.tuile {
  display: flex; flex-direction: column; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre);
  text-decoration: none; color: inherit; overflow: hidden; border: 1px solid transparent; transition: border-color .15s, transform .15s;
}
.tuile:hover { border-color: var(--goutte); transform: translateY(-2px); }
.tuile .vignette { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #fff; padding: 14px; }
.tuile .vignette img, .carte .vignette img, .fiche .photo img, .depot img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.tuile .vignette, .carte .vignette { overflow: hidden; }
.tuile .legende { padding: 12px 14px; border-top: 1px solid var(--trait); }
.tuile .legende b { display: block; font-weight: 600; }
.tuile .legende span { font-size: .8rem; color: var(--doux); }

/* Rubrique et grille de produits */
.fil { font-size: .8rem; color: var(--doux); margin: 20px 0 8px; }
.fil a { color: var(--doux); }
.titre-rubrique { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gamme { margin: 26px 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--nuit); display: flex; align-items: center; gap: 10px; }
.gamme::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.grille-produits { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 36px; }
.carte {
  background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .15s;
}
.carte:hover { border-color: var(--goutte); }
.carte .vignette { aspect-ratio: 1; display: grid; place-items: center; padding: 16px; }
.carte .vignette .vide { color: var(--trait); font-size: 2.4rem; }
.carte .corps { padding: 10px 14px 14px; border-top: 1px solid var(--trait); flex: 1; display: flex; flex-direction: column; gap: 4px; }
.carte .nom { font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .01em; }
.carte .meta { font-size: .78rem; color: var(--doux); margin-top: auto; }
.carte .prix { font-weight: 700; color: var(--nuit); font-size: .9rem; }

/* Fiche produit */
.fiche { display: grid; gap: 28px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin: 10px 0 40px; }
.fiche .photo { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 24px; display: grid; place-items: center; aspect-ratio: 1; position: sticky; top: 124px; }
.fiche h1 { text-transform: uppercase; font-size: 1.6rem; }
.pastille { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #e6f4fb; color: #0d6d98; border-radius: 999px; padding: 3px 10px; }
.tableau { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); margin: 16px 0 8px; font-size: .9rem; }
.tableau th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); font-weight: 600; background: #f8fafb; padding: 10px 14px; border-bottom: 1px solid var(--trait); }
.tableau td { padding: 10px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .ref { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; color: var(--nuit); white-space: nowrap; }
.tableau .num { text-align: right; white-space: nowrap; }
.tableau tr.surligne td { background: #fffbe0; }
.contact-carte { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; margin-top: 22px; border-top: 4px solid var(--goutte); }
.contact-carte .qui { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.contact-carte .initiales { width: 46px; height: 46px; border-radius: 50%; background: var(--nuit); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.contact-carte .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

/* Boutons et formulaires */
.bouton {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 16px; border-radius: 8px; border: 1.5px solid var(--nuit); background: var(--nuit); color: #fff;
  text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap;
}
.bouton:hover { background: var(--nuit-2); }
.bouton.clair { background: #fff; color: var(--nuit); }
.bouton.clair:hover { background: #eef3f8; }
.bouton.jaune { background: var(--eclair); border-color: var(--eclair); color: var(--nuit-2); }
.bouton.danger { background: #fff; color: var(--danger); border-color: #e5b4b0; }
.bouton.petit { padding: 6px 10px; font-size: .8rem; }
.champ { margin-bottom: 14px; }
.champ label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.champ .aide { font-size: .75rem; color: var(--doux); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: 9px 12px; border: 1.5px solid var(--trait); border-radius: 8px; background: #fff; color: var(--texte);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--goutte); box-shadow: 0 0 0 3px rgba(26, 163, 220, .15); }
.errorlist { color: var(--danger); font-size: .8rem; margin: 4px 0; padding: 0; list-style: none; }
.deux { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.piege { position: absolute; left: -9999px; }
.messages { list-style: none; padding: 0; margin: 16px 0; }
.messages li { padding: 12px 16px; border-radius: 8px; background: #e7f5ec; color: #145c33; margin-bottom: 8px; font-weight: 500; }
.messages li.error { background: #fbeceb; color: #8a1d17; }

/* Pied de page */
.pied { background: var(--nuit-2); color: #a9bdd2; font-size: .85rem; margin-top: 30px; }
.pied .enveloppe { padding: 28px 16px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.pied a { color: #fff; }

@media (max-width: 860px) {
  .bandeau .enveloppe, .fiche { grid-template-columns: 1fr; }
  .fiche .photo { position: static; max-width: 420px; }
  .entete .tel { display: none; }
}
@media (max-width: 560px) {
  .entete > .enveloppe { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .recherche { max-width: none; flex-basis: 100%; }
  .deux { grid-template-columns: 1fr; }
  h1, .fiche h1 { font-size: 1.35rem; }
  .bandeau h1 { font-size: 1.5rem; }
  .grille-produits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grille-rubriques { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tableau { font-size: .82rem; }
  .tableau th, .tableau td { padding: 8px 10px; }
}

/* ============ Gestion ============ */
.g-corps { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.g-menu { background: var(--nuit-2); color: #c9d8e8; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.g-menu .logo-blanc { background: #fff; border-radius: 8px; padding: 8px 10px; display: block; margin-bottom: 18px; }
.g-menu .logo-blanc img { height: 30px; display: block; }
.g-menu nav a { display: flex; justify-content: space-between; align-items: center; color: #c9d8e8; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: .88rem; font-weight: 500; }
.g-menu nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.g-menu nav a.actif { background: rgba(26, 163, 220, .2); color: #fff; }
.g-menu nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 4px; }
.g-menu .compteur { background: var(--eclair); color: var(--nuit-2); font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.g-menu .qui { margin-top: 18px; font-size: .78rem; color: #8ea6bf; padding: 0 10px; }
.g-menu .qui button { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.g-page { padding: 24px 28px 60px; min-width: 0; }
.g-titre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.g-titre h1 { margin: 0; font-size: 1.45rem; }
.boite { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px 20px; margin-bottom: 18px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 16px; text-decoration: none; color: inherit; border-left: 4px solid var(--goutte); }
.stat b { display: block; font-size: 1.5rem; font-weight: 700; color: var(--nuit); }
.stat span { font-size: .8rem; color: var(--doux); }
.stat.alerte { border-left-color: var(--alerte); }
.stat.jaune { border-left-color: var(--eclair); }
.barre { height: 6px; background: var(--trait); border-radius: 3px; overflow: hidden; min-width: 80px; }
.barre i { display: block; height: 100%; background: var(--goutte); }
.liste { width: 100%; border-collapse: collapse; font-size: .88rem; }
.liste th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--trait); white-space: nowrap; }
.liste td { padding: 8px 10px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.liste tr:hover td { background: #f8fafb; }
.liste .mini { width: 46px; height: 46px; object-fit: contain; background: #fff; border: 1px solid var(--trait); border-radius: 6px; display: block; }
.liste a.lien-fiche { font-weight: 600; text-decoration: none; }
.liste a.lien-fiche:hover { text-decoration: underline; }
.etiquette { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 4px; padding: 2px 6px; background: #fdf1e3; color: var(--alerte); }
.etiquette.gris { background: #eef1f4; color: var(--doux); }
.etiquette.vert { background: #e7f5ec; color: var(--ok); }
.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filtres select, .filtres input { width: auto; min-width: 180px; }
.onglets { display: flex; gap: 6px; flex-wrap: wrap; }
.onglets a { font-size: .8rem; padding: 6px 10px; border-radius: 999px; text-decoration: none; background: #fff; border: 1px solid var(--trait); color: var(--texte); }
.onglets a.actif { background: var(--nuit); color: #fff; border-color: var(--nuit); }

.edition { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.depot {
  border: 2px dashed var(--trait); border-radius: var(--rayon); aspect-ratio: 1; display: grid; place-items: center; text-align: center;
  cursor: pointer; background: #fff; position: relative; overflow: hidden; padding: 12px; transition: border-color .15s, background .15s;
}
.depot:hover, .depot.survol { border-color: var(--goutte); background: #f2fafe; }
.depot .consigne { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(12, 39, 66, .78); color: #fff; font-size: .78rem; padding: 7px; }
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.source-pdf { display: block; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.source-pdf img { display: block; width: 100%; }
.variantes { width: 100%; border-collapse: collapse; }
.variantes th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); font-weight: 600; padding: 6px 6px; }
.variantes td { padding: 4px 6px; vertical-align: middle; }
.variantes input[type=text], .variantes input:not([type]) { padding: 7px 9px; }
.variantes .col-ref input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; }
.variantes .col-prix { width: 120px; }
.variantes .col-unite { width: 110px; }
.variantes .col-ref { width: 170px; }
.variantes tr.supprime td { opacity: .35; text-decoration: line-through; }
.variantes .poignee { cursor: grab; color: var(--doux); user-select: none; padding: 0 4px; }
.variantes .suppr { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 4px 6px; }
.barre-actions { position: sticky; bottom: 0; background: rgba(244, 246, 248, .95); backdrop-filter: blur(4px); border-top: 1px solid var(--trait); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.alerte-verif { background: #fdf1e3; border: 1px solid #f1d2ad; color: #7a3d05; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: .88rem; }
.grille-prix input { width: 110px; text-align: right; padding: 6px 8px; }
.grille-prix input.modifie { border-color: var(--eclair); background: #fffbe0; }
.grille-prix tr.titre-produit td { background: #f4f6f8; font-weight: 600; font-size: .82rem; padding-top: 12px; }
pre.code { background: var(--nuit-2); color: #e6eef6; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .82rem; white-space: pre-wrap; word-break: break-all; }
.carte-connexion { max-width: 400px; margin: 10vh auto; background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 28px; }
.carte-connexion img { height: 44px; display: block; margin: 0 auto 18px; }
.cases ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.cases li label { font-weight: 500; font-size: .85rem; display: flex; gap: 6px; align-items: center; }

@media (max-width: 1100px) { .edition { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .g-corps { grid-template-columns: 1fr; }
  .g-menu { position: static; height: auto; }
  .g-menu nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .g-menu nav .sep { display: none; }
  .g-page { padding: 16px; }
  .liste .masquer-mobile { display: none; }
}
