/* =============================================================
   Cadence — « le tempo de l'entrepôt ».
   Bleu nuit, sarcelle et menthe, IBM Plex. Un métronome bat à
   l'ouverture, un séquenceur compte les temps, et le contenu se
   lit comme l'entrepôt : casiers, convoyeur, étiquettes de zone,
   terminal portable.
   ============================================================= */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/ibm-plex-sans-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-mono-600-latin.woff2) format('woff2'); }

.cd {
  --night: #0E1B2A; --deep: #08121D; --slate: #1E2F44; --line: #2B3F58; --teal: #0E7C86; --teal-d: #0A5C64; --mint: #14B8A6; --pale: #CCFBF1;
  --mist: #9FB3C8; --grey: #5B6B7F; --paper: #F4F6F7; --rule: #E2E8F0; --amber: #D97706; --red: #E5484D; --ice: #38BDF8;
  --bg: var(--paper); --ink: var(--night); --accent: var(--mint); --on-accent: var(--deep);
  --sans: 'IBM Plex Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: clamp(18px, 5vw, 80px); --beat: .6s; /* 100 battements par minute */
  font-family: var(--sans); font-size: 1.06rem; background: var(--paper); color: var(--night);
}
.cd h1, .cd h2, .cd h3 { font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.cd h1 em, .cd h2 em, .cd-big em { font-style: normal; color: var(--teal); }
.cd h2 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); max-width: 20em; }
.cd h3 { font-size: clamp(1.2rem, 1.9vw, 1.5rem); letter-spacing: -.015em; }
.cd p { color: var(--grey); }
.cd-label { font-family: var(--mono); font-weight: 600; font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--teal) !important; }
.cd-note { font-family: var(--mono); font-size: .82rem; color: var(--grey) !important; border-left: 3px solid var(--mint); padding-left: 14px; margin-top: 26px; max-width: 52em; }
.cd-head { margin-bottom: clamp(30px, 5vw, 60px); }
.cd-head h2 { margin: 14px 0 12px; }

/* --- Barre --- */
.cd-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 26px; padding: 11px var(--pad); background: rgba(14,27,42,.95); backdrop-filter: blur(8px); color: #fff; border-bottom: 1px solid var(--line); }
.cd-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em; }
.cd-brand img { border-radius: 9px; border: 1px solid var(--line); }
.cd-top nav { display: flex; gap: 26px; margin-left: auto; font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mist); }
.cd-top nav a:hover { color: var(--mint); }
.cd-btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; background: var(--mint); color: var(--deep); font-weight: 700; padding: 10px 22px; border-radius: 8px; transition: background .2s, transform .2s; border: 0; }
.cd-btn:hover { background: var(--pale); transform: translateY(-1px); }
.cd-btn-lg { padding: 15px 30px; font-size: 1.1rem; }
.cd-link { font-family: var(--mono); font-size: .86rem; letter-spacing: .08em; color: var(--mint); border-bottom: 1px solid currentColor; padding-bottom: 3px; }

/* --- Ouverture --- */
.cd-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(20px, 4vw, 60px); align-items: center; padding: clamp(50px, 8vw, 110px) var(--pad) clamp(90px, 10vw, 130px); color: #fff; background: radial-gradient(ellipse at 50% 0%, var(--slate), var(--night) 55%, var(--deep)); overflow: hidden; }
.cd-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(159,179,200,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(159,179,200,.05) 1px, transparent 1px); background-size: 64px 64px; pointer-events: none; }
.cd-hero > * { position: relative; }
.cd-hero .cd-label { color: var(--mint) !important; }
.cd-hero h1 { font-size: clamp(2.8rem, 8vw, 7rem); margin: 18px 0 24px; letter-spacing: -.04em; }
.cd-hero h1 em { color: var(--mint); display: block; }
.cd-lead { color: var(--mist) !important; font-size: clamp(1.08rem, 1.5vw, 1.28rem); max-width: 38em; }
.cd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 34px; }
.cd-metro { width: min(300px, 70%); justify-self: center; }
.cd-metro svg { overflow: visible; filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); }
.cd-rod { transform-origin: 150px 350px; animation: cd-swing calc(var(--beat) * 2) ease-in-out infinite; }
@keyframes cd-swing { 0%, 100% { transform: rotate(26deg); } 50% { transform: rotate(-26deg); } }
/* le séquenceur : une barre s'allume à chaque temps */
.cd-seq { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(26px, 4vw, 46px); display: flex; align-items: flex-end; gap: 5px; height: 36px; }
.cd-seq i { flex: 1; height: 12px; border-radius: 3px; background: var(--line); animation: cd-beat calc(var(--beat) * 32) steps(1) infinite; }
.cd-seq i:nth-child(4n+1) { height: 22px; }
@keyframes cd-beat { 0% { background: var(--mint); height: 36px; box-shadow: 0 0 18px var(--mint); } 3.125% { background: var(--teal); box-shadow: none; } }
.cd-seq i:nth-child(1) { animation-delay: calc(var(--beat) * 0); } .cd-seq i:nth-child(2) { animation-delay: calc(var(--beat) * 1); } .cd-seq i:nth-child(3) { animation-delay: calc(var(--beat) * 2); } .cd-seq i:nth-child(4) { animation-delay: calc(var(--beat) * 3); }
.cd-seq i:nth-child(5) { animation-delay: calc(var(--beat) * 4); } .cd-seq i:nth-child(6) { animation-delay: calc(var(--beat) * 5); } .cd-seq i:nth-child(7) { animation-delay: calc(var(--beat) * 6); } .cd-seq i:nth-child(8) { animation-delay: calc(var(--beat) * 7); }
.cd-seq i:nth-child(9) { animation-delay: calc(var(--beat) * 8); } .cd-seq i:nth-child(10) { animation-delay: calc(var(--beat) * 9); } .cd-seq i:nth-child(11) { animation-delay: calc(var(--beat) * 10); } .cd-seq i:nth-child(12) { animation-delay: calc(var(--beat) * 11); }
.cd-seq i:nth-child(13) { animation-delay: calc(var(--beat) * 12); } .cd-seq i:nth-child(14) { animation-delay: calc(var(--beat) * 13); } .cd-seq i:nth-child(15) { animation-delay: calc(var(--beat) * 14); } .cd-seq i:nth-child(16) { animation-delay: calc(var(--beat) * 15); }
.cd-seq i:nth-child(17) { animation-delay: calc(var(--beat) * 16); } .cd-seq i:nth-child(18) { animation-delay: calc(var(--beat) * 17); } .cd-seq i:nth-child(19) { animation-delay: calc(var(--beat) * 18); } .cd-seq i:nth-child(20) { animation-delay: calc(var(--beat) * 19); }
.cd-seq i:nth-child(21) { animation-delay: calc(var(--beat) * 20); } .cd-seq i:nth-child(22) { animation-delay: calc(var(--beat) * 21); } .cd-seq i:nth-child(23) { animation-delay: calc(var(--beat) * 22); } .cd-seq i:nth-child(24) { animation-delay: calc(var(--beat) * 23); }
.cd-seq i:nth-child(25) { animation-delay: calc(var(--beat) * 24); } .cd-seq i:nth-child(26) { animation-delay: calc(var(--beat) * 25); } .cd-seq i:nth-child(27) { animation-delay: calc(var(--beat) * 26); } .cd-seq i:nth-child(28) { animation-delay: calc(var(--beat) * 27); }
.cd-seq i:nth-child(29) { animation-delay: calc(var(--beat) * 28); } .cd-seq i:nth-child(30) { animation-delay: calc(var(--beat) * 29); } .cd-seq i:nth-child(31) { animation-delay: calc(var(--beat) * 30); } .cd-seq i:nth-child(32) { animation-delay: calc(var(--beat) * 31); }

/* --- Film --- */
.cd-film { padding: clamp(50px, 8vw, 100px) var(--pad); }
.cd-film h2 { margin: 14px 0 30px; }
.cd-video { width: min(1120px, 100%); border-radius: 14px; overflow: hidden; background: var(--deep); border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(14,27,42,.25); }
.cd-video figcaption { font-family: var(--mono); font-size: .72rem; color: var(--mist); padding: 12px 16px; }
.cd-video.light { border-color: var(--rule); }

/* --- Point de départ --- */
.cd-start { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(30px, 6vw, 90px); align-items: center; padding: clamp(40px, 6vw, 80px) var(--pad) clamp(60px, 8vw, 110px); }
.cd-start h2 { margin: 14px 0 30px; }
.cd-start h2 em { color: var(--amber); }
.cd-loss { counter-reset: l; }
.cd-loss li { counter-increment: l; position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--rule); }
.cd-loss li::before { content: "0" counter(l); position: absolute; left: 0; top: 24px; font-family: var(--mono); font-weight: 600; color: var(--red); }
.cd-loss h3 { margin-bottom: 6px; }
.cd-rack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 20px; background: var(--night); border-radius: 16px; box-shadow: 0 30px 60px rgba(14,27,42,.25); }
.cd-rack i { aspect-ratio: 1.4; border-radius: 7px; border: 2px solid var(--mint); background: var(--teal); color: var(--pale); font-family: var(--mono); font-weight: 600; font-style: normal; font-size: clamp(.6rem, 1.1vw, .9rem); display: grid; place-items: center; }
.cd-rack i.e { background: transparent; border-color: var(--line); }
.cd-rack i.lost { background: rgba(229,72,77,.18); border-color: var(--red); color: var(--red); animation: cd-lost 2.3s steps(2, jump-none) infinite; }
.cd-rack i.lost:nth-of-type(3n) { animation-delay: .7s; } .cd-rack i.lost:nth-of-type(4n) { animation-delay: 1.3s; }
@keyframes cd-lost { 0%, 80% { opacity: 1; } 90% { opacity: .3; } }

/* --- Le principe --- */
.cd-principle { background: var(--night); color: #fff; padding: clamp(60px, 9vw, 130px) var(--pad); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.cd-big { font-size: clamp(1.7rem, 4vw, 3.4rem); font-weight: 700; line-height: 1.14; letter-spacing: -.025em; color: #fff !important; }
.cd-big em { color: var(--mint); }
.cd-journal { background: var(--deep); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; font-family: var(--mono); }
.cd-journal .cd-label { color: var(--mist) !important; }
.cd-journal ul { margin-top: 14px; }
.cd-journal li { display: grid; grid-template-columns: 5.4em 1fr; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.cd-journal time { color: var(--grey); grid-row: span 2; }
.cd-journal b { color: var(--mint); text-transform: uppercase; letter-spacing: .08em; }
.cd-journal span { color: #fff; }
.cd-journal .cd-note { color: var(--mist) !important; margin-top: 18px; }

/* --- Le parcours : le convoyeur --- */
.cd-flow { padding: clamp(60px, 8vw, 110px) var(--pad); }
.cd-belt { height: 14px; border-radius: 14px; background: var(--rule); overflow: hidden; position: relative; }
.cd-belt span { position: absolute; inset: 0 -80px; background: repeating-linear-gradient(90deg, var(--teal) 0 14px, transparent 14px 40px); animation: cd-roll 1.2s linear infinite; opacity: .55; }
@keyframes cd-roll { to { transform: translateX(40px); } }
.cd-stations { display: grid; grid-template-columns: repeat(5, 1fr); }
.cd-stations li { position: relative; padding: 46px clamp(10px, 1.6vw, 24px) 0 0; }
.cd-stations li::before { content: ""; position: absolute; left: 0; top: -21px; width: 28px; height: 28px; border-radius: 50%; background: var(--mint); border: 5px solid var(--paper); box-shadow: 0 0 0 2px var(--teal); }
.cd-stations span { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: var(--teal); }
.cd-stations h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin: 6px 0 8px; }
.cd-stations p { font-size: .96rem; }
.cd-flow-more { font-family: var(--mono); font-size: .82rem; margin-top: 34px; }

/* --- Les zones : des étiquettes --- */
.cd-zones { padding: clamp(60px, 8vw, 110px) var(--pad); background: #fff; border-block: 1px solid var(--rule); }
.cd-zone-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 34px); }
.cd-zone { --z: var(--red); position: relative; border: 2px solid var(--z); border-radius: 14px; padding: 30px 26px 26px; background: var(--paper); overflow: hidden; }
.cd-zone::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--z) 0 12px, var(--night) 12px 24px); }
.cd-zone.froid { --z: #0284C7; } .cd-zone.adr { --z: var(--amber); }
.cd-zone span { display: inline-block; font-family: var(--mono); font-weight: 600; letter-spacing: .2em; font-size: .8rem; background: var(--z); color: #fff; padding: 3px 12px; border-radius: 5px; margin: 6px 0 14px; }
.cd-zone h3 { font-size: 1.6rem; margin-bottom: 8px; }

/* --- Le terminal --- */
.cd-pda { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(30px, 6vw, 90px); align-items: center; padding: clamp(60px, 8vw, 110px) var(--pad); }
.cd-device { width: min(320px, 100%); justify-self: center; background: #05090F; border-radius: 42px; padding: 12px; box-shadow: 0 40px 80px rgba(14,27,42,.35), 0 0 0 3px var(--slate); position: sticky; top: 100px; }
.cd-screen { background: var(--paper); border-radius: 32px; overflow: hidden; padding-top: 34px; }
.cd-screen p { color: var(--night); }
.cd-screen .t { font-weight: 700; font-size: 1.1rem; padding: 0 20px 12px; }
.cd-screen .k { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); padding: 0 20px; }
.cd-screen .loc { font-weight: 700; font-size: 2.3rem; letter-spacing: .04em; padding: 0 20px; line-height: 1.1; }
.cd-screen .sku { font-family: var(--mono); font-size: .76rem; color: var(--grey); padding: 0 20px; }
.cd-screen .total { background: var(--night); color: #fff; text-align: center; padding: 14px 0; margin: 14px 0 0; }
.cd-screen .total small { display: block; color: var(--mist); font-size: .76rem; }
.cd-screen .total b { font-size: 3.4rem; line-height: 1; animation: cd-tick calc(var(--beat) * 2) ease-in-out infinite; display: inline-block; }
@keyframes cd-tick { 0%, 100% { transform: scale(1); } 6% { transform: scale(1.12); color: var(--mint); } }
.cd-screen li { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-top: 1px solid var(--rule); font-weight: 700; font-size: .9rem; }
.cd-screen li small { display: block; font-weight: 400; color: var(--grey); font-size: .74rem; }
.cd-screen li b { background: var(--pale); color: var(--teal); border-radius: 8px; padding: 2px 14px; font-size: 1.2rem; }
.cd-screen .go { margin: 14px 20px 22px; background: var(--teal); color: #fff; text-align: center; font-weight: 700; padding: 13px; border-radius: 10px; }
.cd-pda-text h2 { margin: 14px 0 26px; }
.cd-defs div { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--rule); }
.cd-defs dt { font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.cd-defs dd { color: var(--grey); }

/* --- La démo complète --- */
.cd-tour { padding: clamp(60px, 8vw, 110px) var(--pad); background: #fff; border-top: 1px solid var(--rule); }

/* --- Démonstration : le bon --- */
.cd-demo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 90px); padding: clamp(60px, 8vw, 110px) var(--pad); background: radial-gradient(ellipse at 20% 0%, var(--slate), var(--night) 60%, var(--deep)); color: #fff; }
.cd-demo .cd-label { color: var(--mint) !important; }
.cd-demo h2 { margin: 14px 0 20px; color: #fff; }
.cd-demo h2 em { color: var(--mint); }
.cd-demo-text p { color: var(--mist); font-size: 1.1rem; }
.cd-form { background: var(--paper); color: var(--night); border-radius: 6px; padding: clamp(20px, 3vw, 38px); position: relative; }
.cd-form::after { content: ""; position: absolute; right: 26px; bottom: 26px; width: 0; height: 0; }
.cd-form-title { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-weight: 600; font-size: .8rem; letter-spacing: .18em; color: var(--night) !important; border-bottom: 2px solid var(--night); padding-bottom: 14px; margin-bottom: 22px; }
.cd-form .field { margin-bottom: 16px; }
.cd-form label { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.cd-form .req { color: var(--teal); }
.cd-form input:not([type=checkbox]), .cd-form textarea { width: 100%; border: 1px solid #C5CED8; border-radius: 6px; background: #fff; padding: 12px 13px; font-size: 1rem; }
.cd-form textarea { min-height: 110px; resize: vertical; }
.cd-form input:focus, .cd-form textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,.25); }
.cd-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cd-form .checkbox { display: flex; gap: 12px; align-items: flex-start; font-family: var(--sans); font-size: .9rem; letter-spacing: 0; text-transform: none; color: var(--grey); margin: 4px 0 20px; }
.cd-form .checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); flex: none; }
.cd-form .checkbox a { text-decoration: underline; }
.cd-form .btn-submit { width: 100%; background: var(--teal); color: #fff; border: 0; font-weight: 700; font-size: 1.08rem; padding: 15px; border-radius: 8px; transition: background .2s; }
.cd-form .btn-submit:hover { background: var(--teal-d); }

/* --- Questions --- */
.cd-faq { padding: clamp(60px, 8vw, 110px) var(--pad); max-width: 1100px; }
.cd-faq h2 { margin-bottom: 30px; }
.cd-faq details { border-top: 1px solid #C5CED8; }
.cd-faq details:last-child { border-bottom: 1px solid #C5CED8; }
.cd-faq summary { list-style: none; position: relative; padding: 20px 60px 20px 0; font-weight: 700; font-size: 1.15rem; }
.cd-faq summary::-webkit-details-marker { display: none; }
.cd-faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 1.5rem; color: var(--teal); }
.cd-faq details[open] summary::after { content: "–"; }
.cd-faq details p { padding: 0 60px 22px 0; max-width: 48em; }

/* --- Pied --- */
.cd-foot { background: var(--deep); color: #fff; padding: 46px var(--pad) 34px; border-top: 4px solid var(--mint); }
.cd-foot-in { display: grid; gap: 16px; justify-items: center; text-align: center; }
.cd-foot .cd-label { color: var(--mint) !important; }
.cd-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; color: var(--mist); }
.cd-foot nav a:hover { color: var(--mint); }
.cd-made { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: .9rem; color: var(--mist) !important; border-top: 1px solid var(--line); padding-top: 20px; width: 100%; }
.cd-made img { border-radius: 5px; }
.cd-made a { color: #fff; font-weight: 700; }

/* --- Écrans étroits --- */
@media (max-width: 960px) {
  .cd-top nav { display: none; }
  .cd-top { justify-content: space-between; }
  .cd-hero { grid-template-columns: 1fr; }
  .cd-metro { width: 190px; }
  .cd-start, .cd-principle, .cd-pda, .cd-demo { grid-template-columns: 1fr; }
  .cd-belt { display: none; }
  .cd-stations { grid-template-columns: 1fr; border-left: 6px solid var(--rule); margin-left: 11px; }
  .cd-stations li { padding: 0 0 28px 34px; }
  .cd-stations li::before { left: -17px; top: 0; }
  .cd-zone-row { grid-template-columns: 1fr; }
  .cd-device { position: static; }
}
@media (max-width: 560px) {
  .cd-defs div { grid-template-columns: 1fr; gap: 4px; }
  .cd-form .field-row { grid-template-columns: 1fr; gap: 0; }
  .cd-btn { padding: 9px 14px; font-size: .9rem; }
  .cd-btn-lg { padding: 13px 24px; font-size: 1.02rem; }
  .cd-seq i:nth-child(n+17) { display: none; }
  .cd-seq i { animation-duration: calc(var(--beat) * 16); }
}
