/* Maquette indicative, location de voiliers et catamarans. Socle : police, jetons, contrôles, plaquettes, toast. */
@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/overpass-latin.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: "Overpass";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/overpass-latin-ext.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 {
  --enamel: #123f6b;        /* plaque émaillée de ponton */
  --enamel-2: #1a4f82;
  --enamel-deep: #0d3157;
  --on-enamel: #ffffff;
  --on-enamel-2: #c9d9ea;
  --ground: #eef1f2;        /* gris galvanisé */
  --card: #ffffff;
  --rule: #d5dce0;
  --rule-strong: #b7c2c9;
  --ink: #0c1c2b;
  --ink-2: #33475a;
  --muted: #566a7b;
  --buoy: #f5c400;          /* jaune bouée, action seulement */
  --buoy-deep: #dcae00;
  --free: #1d7f46;          /* plaquette verte */
  --free-soft: #e3f2e9;
  --taken: #b8322a;         /* plaquette rouge */
  --taken-soft: #f8e4e2;
  --hold: #8f6200;          /* option, hachurée */
  --hold-soft: #fbefcc;
  --unknown: #6b7c8a;
  --focus: #1a6fd1;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;
  --shadow-1: 0 1px 2px rgba(12, 28, 43, .06), 0 2px 8px rgba(12, 28, 43, .05);
  --shadow-2: 0 8px 28px rgba(12, 28, 43, .16), 0 2px 6px rgba(12, 28, 43, .08);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-1: 0.8125rem;   /* libellés */
  --t-2: 0.9375rem;   /* texte */
  --t-3: 1.25rem;     /* titres de bloc */
  --t-4: 1.875rem;    /* titre d'écran */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: "Overpass", system-ui, sans-serif;
  font-size: var(--t-2);
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #cfe0f3; color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; letter-spacing: -0.01em; }
a { color: var(--enamel-2); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.caps { font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }

/* Boutons : une seule famille, trois poids */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-s); border: 1px solid var(--rule-strong);
  background: var(--card); color: var(--ink);
  font-weight: 700; font-size: var(--t-2); cursor: pointer; text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-go { background: var(--buoy); border-color: var(--buoy-deep); color: var(--ink); }
.btn-dark { background: var(--enamel); border-color: var(--enamel); color: var(--on-enamel); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--enamel-2); padding: 0 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink-2); }
  .btn-go:hover { background: #ffd21f; border-color: var(--buoy-deep); }
  .btn-dark:hover { background: var(--enamel-2); border-color: var(--enamel-2); }
  .btn-quiet:hover { background: rgba(18, 63, 107, .07); border-color: transparent; }
}

/* Champs */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: var(--t-1); font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--rule-strong); border-radius: var(--r-s); background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333475a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(26, 111, 209, .18); }
.input::placeholder, .textarea::placeholder { color: #6f8191; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--taken); }
.err { display: none; font-size: var(--t-1); color: var(--taken); font-weight: 600; }
.field.has-error .err, .check.has-error .err { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-1); color: var(--ink-2); flex-wrap: wrap; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--enamel); flex: none; }
.check label { flex: 1; min-width: 0; }

/* Plaquette de ponton : l'état d'une semaine, lisible sans la couleur */
.plate {
  --c: var(--free);
  display: inline-grid; justify-items: center; align-content: center; gap: 1px;
  min-width: 58px; padding: 5px 6px 4px; border-radius: 5px;
  background: var(--c); color: #fff; border: 1.5px solid var(--c);
  font-size: 0.6875rem; line-height: 1.3; font-weight: 700; letter-spacing: .02em;
  position: relative;
}
.plate b { font-size: 0.75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.plate.is-taken { --c: var(--taken); }
.plate.is-taken b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.plate.is-hold {
  --c: var(--hold);
  color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M-2 2l4-4M0 8l8-8M6 10l4-4' stroke='%23f1d27a' stroke-width='3'/%3E%3C/svg%3E") #fff;
}
.plate.is-unknown { --c: var(--unknown); color: var(--ink-2); background: #fff; border-style: dashed; }
.plate.is-pick { outline: 2px solid var(--ink); outline-offset: 2px; }
.plates { display: flex; gap: 6px; flex-wrap: wrap; }

/* Pastille d'état de dossier (CRM et compte) */
.tag {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 9px 2px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  border: 1px solid var(--rule-strong); background: #fff; color: var(--ink-2);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.s-new { color: var(--enamel-2); border-color: #b7cce3; background: #eef4fb; }
.tag.s-hold { color: var(--hold); border-color: #e8cf8a; background: var(--hold-soft); }
.tag.s-sent { color: #24577f; border-color: #b9cfe0; background: #edf3f8; }
.tag.s-follow { color: #8a4a00; border-color: #eccaa0; background: #fdf1e2; }
.tag.s-won { color: var(--free); border-color: #b5dcc4; background: var(--free-soft); }
.tag.s-lost { color: var(--muted); }

/* Bandeau de démonstration */
.demo-bar {
  display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  padding: 7px 20px; background: var(--ink); color: #dbe5ee; font-size: var(--t-1);
}
.demo-bar strong { color: #fff; font-weight: 700; }
.demo-bar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.demo-bar a, .demo-bar button {
  color: #dbe5ee; background: transparent; border: 1px solid transparent; border-radius: 5px;
  padding: 3px 9px; text-decoration: none; cursor: pointer; font-size: var(--t-1);
}
.demo-bar a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.demo-bar .demo-right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.demo-bar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-bar input { accent-color: var(--buoy); }
@media (hover: hover) and (pointer: fine) {
  .demo-bar a:hover, .demo-bar button:hover { border-color: rgba(255, 255, 255, .25); }
}

.show-s { display: none; }
@media (max-width: 620px) {
  .hide-s { display: none; }
  .show-s { display: inline; }
  .demo-bar { padding: 6px 10px; gap: 4px 8px; flex-wrap: nowrap; }
  .demo-bar > strong { display: none; }
  .demo-bar .demo-right { gap: 2px; flex-wrap: nowrap; }
  .demo-bar a, .demo-bar button, .demo-bar label { padding: 3px 6px; white-space: nowrap; }
}
.foot { padding: 22px 20px 30px; text-align: center; font-size: var(--t-1); color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 90;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: var(--r-m);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-2);
  font-size: var(--t-2); font-weight: 600;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform 260ms var(--ease-out), opacity 200ms var(--ease-out);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Squelette de chargement */
.skel { background: linear-gradient(90deg, #e3e8eb 0 40%, #edf1f3 50%, #e3e8eb 60% 100%); background-size: 300% 100%; animation: skel 1.2s linear infinite; border-radius: var(--r-s); }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .toast { transform: translate(-50%, 0); transition: opacity 200ms ease; }
  .skel { animation: none; }
  .btn:active { transform: none; }
}
