/*
Theme Name: CLM Manutention
Description: Thème sur mesure, monté depuis la maquette Claude Design du 19/11/2026. Version mobile ; la largeur desktop attend la maquette 1440.
Version: 0.1.0
Text Domain: clm
*/
:root { --bleu: #2F7FC1; --nuit: #0E2233; --orange: #F26A1B; --gris: #E9EDF1; --clair: #F7F8FA; --trait: #C5CED6; --texte: #1B2630; --doux: #4A5967; --lien: #1D66A3; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--gris); color: var(--texte); font: 400 16px/1.45 Barlow, system-ui, sans-serif; }
img, svg { max-width: 100%; }
a { color: var(--lien); }
p { margin: 0 0 12px; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
[hidden] { display: none !important; }
.clm-cache, .clm-miel { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.clm-evitement { position: absolute; left: -9999px; }
.clm-evitement:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 10px 14px; }

/* Colonne unique en attendant la maquette desktop */
.clm-page { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100vh; padding-bottom: 64px; box-shadow: 0 0 0 1px var(--trait); }
.clm-haut { position: sticky; top: 0; z-index: 50; }
.clm-menu { position: absolute; left: 0; right: 0; top: 56px; max-height: calc(100vh - 56px); overflow-y: auto; background: #fff; border-bottom: 1px solid var(--trait); box-shadow: 0 8px 16px rgba(14, 34, 51, .12); }
.clm-barre { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40; }
body.clm-sans-barre .clm-barre { display: none; }

/* Survols de la maquette */
.scp0:hover { background: #D9590F !important; }
.scp1:hover { background: rgba(255, 255, 255, .1) !important; }
.scp2:hover { background: var(--gris) !important; }
.scp3:hover { border-color: var(--bleu) !important; }
.scp4:active { background: var(--gris) !important; }
.scp5:active { background: #C24E0B !important; }
.scp6:hover { background: #1A3550 !important; }
.scp7:focus, .scp8:focus { outline: 2px solid var(--bleu) !important; outline-offset: 1px !important; border-color: var(--bleu) !important; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details[open] > summary .faq-x { transform: rotate(45deg); }

/* Pages intérieures */
.clm-prose { padding: 20px 20px 32px; }
.clm-prose h1 { margin: 6px 0 12px; font: 700 34px/1.04 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-prose h2 { margin: 26px 0 8px; font: 700 26px/1.08 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-prose h2 small { font: 400 16px/1 Barlow, sans-serif; color: var(--doux); }
.clm-prose h3 { margin: 18px 0 6px; font: 600 21px/1.15 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-prose ul { margin: 0 0 12px; padding-left: 20px; }
.clm-prose li { margin-bottom: 4px; }
.clm-chapo { font-size: 18px; color: var(--doux); }
.clm-fil { font: 500 14px/1.3 "IBM Plex Mono", monospace; color: var(--doux); }
.clm-fil a { color: var(--doux); display: inline-block; padding: 8px 0; }
.clm-table { overflow-x: auto; margin: 0 -20px 14px; padding: 0 20px; }
.clm-table table { border-collapse: collapse; font: 500 14px/1.3 "IBM Plex Mono", monospace; white-space: nowrap; }
.clm-table th, .clm-table td { border: 1px solid var(--trait); padding: 7px 9px; text-align: right; }
.clm-table th { background: var(--nuit); color: #fff; font-weight: 500; }
.clm-table td:first-child, .clm-table th:first-child { text-align: left; position: sticky; left: 0; }
.clm-table td:first-child { background: var(--clair); color: var(--nuit); font-weight: 600; }
.clm-note { border-left: 3px solid var(--bleu); background: var(--clair); padding: 10px 12px; margin: 0 0 14px; }
.clm-liens { list-style: none; padding: 0 !important; margin: 0 0 14px; border-top: 1px solid var(--trait); }
.clm-liens li { margin: 0; border-bottom: 1px solid var(--trait); }
.clm-liens a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; color: var(--nuit); text-decoration: none; font: 600 20px/1.1 "Barlow Condensed", sans-serif; }
.clm-liens a::after { content: "›"; color: var(--bleu); font-size: 26px; }
.clm-pdf { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1.5px solid var(--nuit); border-radius: 4px; color: var(--nuit); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.clm-pdf small { margin-left: auto; font: 500 14px/1 "IBM Plex Mono", monospace; color: var(--doux); }

/* Boutons */
.clm-bouton { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-radius: 4px; background: var(--orange); color: #fff; font: 700 21px/1 "Barlow Condensed", sans-serif; letter-spacing: .01em; text-decoration: none; cursor: pointer; }
.clm-bouton:hover { background: #D9590F; }
.clm-bouton--clair { background: #fff; color: var(--nuit); border: 1.5px solid var(--nuit); }
.clm-bouton--clair:hover { background: var(--gris); }
.clm-lien { min-height: 48px; border: 0; background: none; padding: 0; color: var(--lien); font: 500 16px/1 Barlow, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Formulaires */
.clm-erreur { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #B3261E; background: #FDECEA; color: #7A1A14; font-weight: 500; }
.clm-fichiers { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.clm-fichiers li { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 10px; border: 1px solid var(--trait); border-radius: 4px; background: #fff; font: 500 14px/1.2 "IBM Plex Mono", monospace; }
.clm-fichiers li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clm-fichiers button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--nuit); cursor: pointer; }
.clm-etapes { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.clm-etapes fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.clm-etapes legend { padding: 0; margin-bottom: 10px; font: 700 28px/1.05 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-pas { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 3px; background: var(--nuit); color: #fff; font: 500 14px/1.2 "IBM Plex Mono", monospace; vertical-align: 5px; }
.clm-aide { margin: 0; color: var(--doux); }
.clm-mono { font: 400 15px/1.3 "IBM Plex Mono", monospace; color: var(--doux); }
.clm-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clm-tuile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 96px; padding: 12px; border: 1.5px solid var(--trait); border-radius: 4px; background: #fff; font: 600 20px/1.1 "Barlow Condensed", sans-serif; color: var(--nuit); cursor: pointer; }
.clm-tuile svg { fill: none; stroke: var(--bleu); stroke-width: 1.8; stroke-linejoin: round; }
.clm-tuile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.clm-tuile:has(input:checked) { border-color: var(--bleu); background: #EAF3FA; box-shadow: inset 0 0 0 1px var(--bleu); }
.clm-tuile:has(input:focus-visible) { outline: 2px solid var(--bleu); outline-offset: 2px; }
.clm-tuile--large { grid-column: 1 / -1; min-height: 72px; justify-content: center; gap: 2px; }
.clm-tuile small { font: 400 15px/1.3 Barlow, sans-serif; color: var(--doux); }
.clm-depot { border: 1.5px dashed var(--bleu); border-radius: 4px; background: var(--clair); padding: 12px; }
.clm-depot-titre { font: 600 21px/1.1 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.clm-deux button { height: 60px; border: 1.5px solid var(--nuit); border-radius: 4px; background: #fff; color: var(--nuit); font: 600 18px/1 "Barlow Condensed", sans-serif; cursor: pointer; }
.clm-champ { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--nuit); min-width: 0; }
.clm-champ em { font: 400 14px/1.2 "IBM Plex Mono", monospace; color: var(--doux); font-style: normal; margin-left: 6px; }
.clm-champ input, .clm-champ select, .clm-champ textarea { width: 100%; min-height: 52px; padding: 0 12px; border: 1.5px solid #8795A1; border-radius: 4px; background: #fff; font: 400 16px/1.4 Barlow, sans-serif; color: var(--texte); }
.clm-champ textarea { padding: 12px; min-height: 84px; resize: vertical; }
.clm-champ input:focus, .clm-champ select:focus, .clm-champ textarea:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }
.clm-unite { position: relative; display: block; }
.clm-unite i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 14px/1 "IBM Plex Mono", monospace; color: var(--doux); font-style: normal; }
.clm-unite input { padding-right: 44px; font-family: "IBM Plex Mono", monospace; }
.clm-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; }
.clm-choix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.clm-choix label { position: relative; }
.clm-choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.clm-choix span { display: flex; align-items: center; justify-content: center; height: 48px; border: 1.5px solid var(--trait); border-radius: 4px; font-weight: 500; color: var(--nuit); }
.clm-choix input:checked + span { border-color: var(--bleu); background: #EAF3FA; box-shadow: inset 0 0 0 1px var(--bleu); }
.clm-choix input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: 2px; }
.clm-urgent { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border: 1.5px solid var(--orange); border-radius: 4px; font-weight: 600; color: var(--nuit); cursor: pointer; }
.clm-urgent input { width: 22px; height: 22px; accent-color: var(--orange); }
.clm-nav { display: flex; flex-direction: column-reverse; gap: 4px; }
.clm-coche { width: 56px; height: 56px; border: 2px solid var(--bleu); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.clm-coche svg { fill: none; stroke: var(--bleu); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.clm-encart { display: flex; flex-direction: column; gap: 2px; margin: 16px 0; padding: 14px; border: 1px solid var(--trait); border-radius: 4px; background: var(--clair); }
.clm-encart strong { font: 700 22px/1.1 "Barlow Condensed", sans-serif; color: var(--nuit); }
.clm-encart span { color: var(--doux); }
.clm-tel { display: inline-flex; align-items: center; min-height: 48px; font: 600 24px/1 "IBM Plex Mono", monospace; color: var(--nuit); text-decoration: none; }

/* Carte de la zone */
.clm-carte { margin-top: 10px; }
.clm-carte svg { display: block; width: 100%; height: auto; }
.clm-carte .d { stroke: #fff; stroke-width: .5; stroke-linejoin: round; cursor: pointer; }
.clm-carte .principale { fill: var(--bleu); }
.clm-carte .servi { fill: #A8CBE8; }
.clm-carte .non { fill: #DDE3E9; }
.clm-carte .d.actif { stroke: var(--orange); stroke-width: 2; }
.clm-legende { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 14px; padding: 0; font-size: 15px; }
.clm-legende li { display: flex; align-items: center; gap: 6px; }
.clm-legende i { width: 14px; height: 14px; border-radius: 2px; display: inline-block; }
.clm-legende .principale { background: var(--bleu); }
.clm-legende .servi { background: #A8CBE8; }
.clm-legende .non { background: #DDE3E9; }
.clm-carte label { display: block; font-weight: 600; color: var(--nuit); margin-bottom: 6px; }
.clm-dep { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; }
.clm-dep input { height: 52px; padding: 0 12px; border: 1.5px solid #8795A1; border-radius: 4px; font: 500 18px/1 "IBM Plex Mono", monospace; color: var(--texte); width: 100%; }
.clm-dep [data-reponse] { line-height: 1.3; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Desktop (à partir de 960 px) : mise en page pleine largeur montée sur les sections de la maquette mobile ---------- */
.clm-nav-d { display: none; }
@media (min-width: 960px) {
  :root { --bord: max(40px, calc((100vw - 1240px) / 2)); }
  body { background: #fff; font-size: 17px; }
  .clm-page { max-width: none; padding-bottom: 0; box-shadow: none; }
  .clm-barre { display: none; }
  html { scroll-padding-top: 88px; }

  /* En-tête */
  .clm-haut > header { height: 76px !important; padding: 0 var(--bord) !important; }
  .clm-haut > header > a svg { width: 102px; height: 58px; }
  .clm-nav-d { display: flex; align-items: center; gap: 4px; position: absolute; right: var(--bord); top: 0; height: 76px; }
  .clm-nav-d a { display: flex; align-items: center; height: 44px; padding: 0 11px; color: var(--nuit); text-decoration: none; font: 600 19px/1 "Barlow Condensed", sans-serif; border-radius: 4px; white-space: nowrap; }
  .clm-nav-d a:hover { background: var(--gris); }
  .clm-nav-d .clm-nav-tel { margin-left: 10px; font: 600 17px/1 "IBM Plex Mono", monospace; }
  .clm-nav-d .clm-nav-cta { margin-left: 6px; height: 48px; padding: 0 20px; background: var(--orange); color: #fff; font-size: 20px; font-weight: 700; }
  .clm-nav-d .clm-nav-cta:hover { background: #D9590F; }

  /* Règles communes aux sections */
  .clm-s > section { padding: 72px var(--bord) 40px !important; }
  .clm-s > section h2 { font-size: 44px !important; margin-bottom: 24px !important; }
  .clm-s > section > div:last-child:not(.clm-carte) { margin-top: 40px !important; }

  /* 1. Ouverture : texte à gauche, image à droite */
  .clm-s-ouverture > section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0 !important; min-height: 600px; }
  .clm-s-ouverture > section > div:nth-child(2) { padding: 72px 56px 64px var(--bord) !important; align-self: center; }
  .clm-s-ouverture > section > div:nth-child(2) > div:first-child { font-size: 17px !important; }
  .clm-s-ouverture h1 { font-size: 66px !important; line-height: 1 !important; margin-bottom: 18px !important; }
  .clm-s-ouverture h1 + p { font-size: 21px !important; max-width: 560px; margin-bottom: 26px !important; }
  .clm-s-ouverture > section > div:nth-child(2) > a { display: inline-flex !important; width: auto !important; padding: 0 28px !important; margin-right: 10px; vertical-align: top; }
  .clm-s-ouverture > section > div:nth-child(2) > ul { margin-top: 30px !important; max-width: 560px; }
  .clm-s-ouverture > section > div:nth-child(3) { height: auto !important; min-height: 600px; }
  .clm-s-ouverture > section > div:nth-child(3) > img { inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }
  .clm-s-ouverture > section > div:nth-child(3) > svg { display: none !important; }
  .clm-s-ouverture > section > div:nth-child(2) > a { height: 56px !important; margin-top: 0 !important; margin-bottom: 0 !important; }

  /* 2. Familles : trois colonnes */
  .clm-s-familles > section > div:nth-of-type(1) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 16px !important; }
  .clm-s-familles > section > div:nth-of-type(1) > a { padding: 22px !important; min-height: 170px; }
  .clm-s-familles > section > div:nth-of-type(1) > a > span:nth-child(2) { font-size: 28px !important; }
  .clm-s-familles > section > a { margin-top: 14px; font-size: 18px; }

  /* 3. Mesures : schéma à gauche, étapes à droite */
  .clm-s-mesures > section { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 64px; align-items: start; }
  .clm-s-mesures > section > h2, .clm-s-mesures > section > div:last-child { grid-column: 1 / -1; }
  .clm-s-mesures > section > div:nth-of-type(1) { grid-column: 1; grid-row: 2 / span 3; }
  .clm-s-mesures > section > ol, .clm-s-mesures > section > a { grid-column: 2; }
  .clm-s-mesures > section > ol { font-size: 20px; margin-top: 0 !important; }
  .clm-s-mesures > section > a { max-width: 380px; }

  /* 4. Secteurs : quatre colonnes */
  .clm-s-secteurs > section > div:nth-of-type(1) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; }
  .clm-s-secteurs > section > div:nth-of-type(1) > a { height: 68px !important; padding: 8px 14px !important; font-size: 19px !important; }

  /* 5. Usines : trois cartes côte à côte, sans défilement */
  .clm-s-usines > section > div:last-child { margin-top: 0 !important; }
  .clm-s-usines > section > div:last-child > * { padding-left: 0 !important; padding-right: 0 !important; }
  .clm-s-usines > section > div:last-child > div:first-child > span { display: none !important; }
  .clm-s-usines > section > div:last-child > div:nth-child(2) { overflow: visible !important; gap: 20px !important; }
  .clm-s-usines > section > div:last-child > div:nth-child(2) > article { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; padding: 26px !important; }
  .clm-s-usines > section > div:last-child > div:nth-child(2) > div { display: none !important; }
  .clm-s-usines > section > div:last-child > p { margin: 24px 0 0 !important; max-width: 760px; }
  .clm-s-usines > section > div:last-child > div:last-child { margin-left: 0 !important; margin-right: 0 !important; }
  .clm-s-usines > section > div:last-child > div:last-child { margin-top: 40px !important; }

  /* 6. Interlocuteur : carte de visite à gauche, zone à droite */
  .clm-s-interlocuteur > section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: start; }
  .clm-s-interlocuteur > section > h2, .clm-s-interlocuteur > section > div:last-child { grid-column: 1 / -1; }
  .clm-s-interlocuteur > section > div:nth-of-type(1) { grid-column: 1; grid-row: 2 / span 2; padding: 28px !important; }
  .clm-s-interlocuteur > section > h3, .clm-s-interlocuteur > section > .clm-carte { grid-column: 2; }
  .clm-s-interlocuteur > section > h3 { margin-top: 0 !important; }
  .clm-s-interlocuteur .clm-carte svg { max-width: 520px; }

  /* 7 et 9. Déroulé, questions : titre à gauche, contenu à droite */
  .clm-s-deroule > section, .clm-s-questions > section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: 64px; align-items: start; }
  .clm-s-deroule > section > div:last-child { grid-column: 1 / -1; }
  .clm-s-deroule > section > ol { font-size: 19px; }
  .clm-s-questions > section > div:last-child { margin-top: 0 !important; font-size: 19px; }
  .clm-s-questions summary { font-size: 22px !important; }

  /* 8. Catalogues : deux colonnes */
  .clm-s-catalogues > section > ul { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
  .clm-s-catalogues > section > ul > li { padding: 16px 0 !important; }
  .clm-s-catalogues > section > ul > li > img { height: 96px !important; width: auto !important; }

  /* 10. Formulaire : promesse à gauche, formulaire à droite */
  .clm-s-formulaire > section { padding-bottom: 72px !important; }
  .clm-s-formulaire > section > div:last-child { display: grid; grid-template-columns: minmax(0, 1fr) 540px; column-gap: 72px; align-items: start; margin-top: 0 !important; }
  .clm-s-formulaire > section > div:last-child > h2 { font-size: 56px !important; margin: 24px 0 12px !important; }
  .clm-s-formulaire > section > div:last-child > p { font-size: 22px; }
  .clm-s-formulaire > section > div:last-child > div { grid-column: 2; grid-row: 1 / span 4; }
  .clm-s-formulaire > section > div:last-child > div > div { padding: 26px !important; }
  .clm-s-formulaire > section > div:last-child > a { justify-content: flex-start !important; grid-column: 1; }

  /* Pied de page : quatre colonnes */
  .clm-page > footer { padding: 64px var(--bord) 40px !important; column-count: 4; column-gap: 48px; }
  .clm-page > footer > * { break-inside: avoid; }
  .clm-page > footer > h3 { break-after: avoid; }
  .clm-page > footer > div:nth-last-child(2), .clm-page > footer > p:last-child { column-span: all; }

  /* Pages intérieures */
  .clm-prose { padding: 40px var(--bord) 64px; max-width: calc(1000px + 2 * var(--bord)); }
  .clm-prose h1 { font-size: 54px; margin-bottom: 18px; }
  .clm-prose h2 { font-size: 34px; margin-top: 40px; }
  .clm-chapo { font-size: 22px; }
  .clm-table { margin: 0 0 18px; padding: 0; }
  .clm-table table { font-size: 15px; }
  .clm-liens { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .clm-pdf { max-width: 520px; }
  .clm-guide, .clm-confirmation { max-width: calc(680px + 2 * var(--bord)); margin: 0 auto; }
  .clm-nav { flex-direction: row; justify-content: space-between; align-items: center; }
  .clm-nav .clm-bouton { width: auto; min-width: 240px; margin-left: auto; }
  .clm-tuiles { grid-template-columns: repeat(3, 1fr); }
}

/* Entre 960 et 1239 px : téléphone, bouton et menu déroulant ; au-delà : navigation complète */
@media (min-width: 960px) and (max-width: 1239px) {
  .clm-nav-d { right: calc(var(--bord) + 56px); }
  .clm-nav-d a:not(.clm-nav-tel):not(.clm-nav-cta) { display: none; }
  .clm-haut > header > div > a { display: none !important; }
  .clm-menu { top: 76px; max-height: calc(100vh - 76px); padding: 0 var(--bord); }
  .clm-s-ouverture h1 { font-size: 52px !important; }
  .clm-s-ouverture > section > div:nth-child(2) > a { margin-bottom: 10px !important; }
}
@media (min-width: 1240px) {
  .clm-haut > header > div { display: none !important; }
  .clm-menu { display: none !important; }
}
