/* ==========================================================================
   MMA Performance Coatings : thème portable
   Source : mmacoatings.com (site/public_html/assets/css/site.css, 2026-10)

   Installation : copier ce fichier + le dossier fonts/ côte à côte.
     <link rel="stylesheet" href="mma-theme.css">
     <body data-surface="auto">   (auto | ind | com | pou | par)

   Principe : un seul élément fort, le caméléon (--chroma). Tout le reste
   est calme : toile noire, texte chromé, filets discrets.
   ========================================================================== */

/* ---- Polices (auto-hébergées, variables : poids 100-900, largeur) ---- */
@font-face { font-family: 'Anybody'; font-style: italic; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url(../fonts/anybody-italic-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; }
@font-face { font-family: 'Anybody'; font-style: italic; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url(../fonts/anybody-italic-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: 'Anybody'; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url(../fonts/anybody-normal-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; }
@font-face { font-family: 'Anybody'; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url(../fonts/anybody-normal-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: 'Archivo'; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-italic-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; }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-italic-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: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-normal-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; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-normal-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; }

/* ---- Jetons ---- */
@property --chroma { syntax: '<color>'; inherits: true; initial-value: #a54cf5; }

:root {
  /* toile : #050507 = le fond du logo, le caméléon est DANS la page */
  --ink:      #050507;
  --ink-2:    #0d0d12;   /* panneaux, cartes */
  --ink-3:    #17171f;   /* en-têtes de tableau, survols */
  --line:     #262630;   /* filets */
  /* texte chromé */
  --chrome:   #e2e4ea;   /* texte principal  16.0:1 */
  --chrome-2: #a3a6b0;   /* texte secondaire  8.4:1 */
  --chrome-3: #5b5e69;   /* décoratif, bordures de champ, jamais de texte utile (3.2:1) */
  /* les cinq couleurs du caméléon (une par secteur) */
  --c-auto: #a54cf5;     /* carrosserie automobile (violet du logo, défaut) */
  --c-ind:  #f2b20c;     /* industriel */
  --c-com:  #1fb5d3;     /* commercial */
  --c-pou:  #78d43c;     /* peinture en poudre */
  --c-par:  #f0473b;     /* pièces de carrosserie */
  --chroma: var(--c-auto);
  --logo-rotate: 0deg;
  /* états (hors caméléon) */
  --ok:  #78d43c;
  --err: #ff8a80;  --err-line: #ff6b5e;  --err-bg: #2a0f0d;
  /* typo */
  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --text:    'Archivo', system-ui, sans-serif;
  --mono:    ui-monospace, 'Cascadia Mono', Consolas, monospace;
  /* rythme */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
  --radius: 6px;
  --pill: 999px;
  color-scheme: dark;
}

/* Bascule de secteur : sur <body>, une <section>, une carte… n'importe où. */
[data-surface="auto"] { --chroma: var(--c-auto); --logo-rotate: 0deg; }
[data-surface="ind"]  { --chroma: var(--c-ind);  --logo-rotate: 128deg; }
[data-surface="com"]  { --chroma: var(--c-com);  --logo-rotate: -86deg; }
[data-surface="pou"]  { --chroma: var(--c-pou);  --logo-rotate: -172deg; }
[data-surface="par"]  { --chroma: var(--c-par);  --logo-rotate: 92deg; }

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--chrome);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: --chroma 900ms ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--chroma); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--chroma); outline-offset: 3px; }
::selection { background: var(--chroma); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.2vw, 3.7rem); font-style: italic; font-stretch: 130%; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; font-stretch: 110%; }
p  { margin: 0 0 1rem; max-width: 66ch; }
.lead  { font-size: 1.2rem; color: var(--chrome-2); }
.muted { color: var(--chrome-2); }
.num   { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.accent { color: var(--chroma); }

.mma-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Marque ---- */
.mma-wordmark {               /* le logo texte, quand l'image ne convient pas */
  font-family: var(--display); font-weight: 800; font-stretch: 130%;
  color: var(--chrome); text-decoration: none; white-space: nowrap;
}
.mma-wordmark em { font-style: normal; font-weight: 500; font-stretch: 100%; color: var(--chrome-2); font-size: 0.82em; margin-left: 0.35em; }
.mma-logo  { filter: hue-rotate(var(--logo-rotate)); transition: filter 900ms ease; }
.mma-icon  { border-radius: 50%; filter: hue-rotate(var(--logo-rotate)); transition: filter 900ms ease; }
.mma-logo-fade {              /* fond le rectangle noir du JPEG dans la page */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}

/* ---- En-tête ---- */
.mma-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: rgba(5, 5, 7, 0.92);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mma-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mma-brand .mma-icon { width: 36px; height: 36px; }
.mma-brand .mma-wordmark { font-size: 1.15rem; }
.mma-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.mma-nav a:not(.btn) { text-decoration: none; color: var(--chrome-2); font-size: 0.95rem; }
.mma-nav a:not(.btn):hover,
.mma-nav a[aria-current="page"] { color: var(--chrome); }
.mma-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--chroma); text-decoration-thickness: 2px; }
.mma-nav .lang { border: 1px solid var(--line); border-radius: var(--pill); padding: 0.2rem 0.7rem; }

/* ---- Boutons : pilule --chroma, texte couleur encre ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 700; font-stretch: 115%; font-size: 1rem; line-height: 1.2;
  color: var(--ink);
  background: var(--chroma);
  border: 1px solid transparent;
  padding: 0.8rem 1.4rem;
  border-radius: var(--pill);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: color-mix(in oklab, var(--chroma) 80%, white); }
.btn-ghost { background: transparent; color: var(--chrome); border-color: var(--chrome-3); }
.btn-ghost:hover { background: var(--ink-3); border-color: var(--chroma); }
.btn-danger { background: var(--err-line); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-big   { padding: 1rem 2rem; font-size: 1.1rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* ---- Pastilles de peinture (le motif signature) ---- */
.chip-fan { display: flex; gap: 0.35rem; padding: 1.5rem 1rem 0.5rem 0; }
.chip {
  --chip: var(--chroma);
  --lift: 0px;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px 6px 3px 3px;
  padding: 0;
  color: var(--chrome-2);
  font: inherit; text-align: left; text-decoration: none;
  cursor: pointer;
  transform: translateY(var(--lift));
  transition: transform 300ms ease, color 300ms ease, border-color 300ms ease;
}
.chip-fan .chip { transform-origin: 50% 220%; transform: rotate(calc((var(--i, 2) - 2) * 2.5deg)) translateY(var(--lift)); }
.chip-swatch {
  display: block; height: 7.5rem; border-radius: 5px 5px 0 0;
  background: linear-gradient(155deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%), var(--chip);
}
.chip-name { display: block; padding: 0.55rem 0.6rem 0.7rem; font-size: 0.82rem; line-height: 1.25; font-weight: 600; hyphens: auto; }
.chip-code { display: block; padding: 0 0.6rem 0.6rem; font-family: var(--mono); font-size: 0.75rem; color: var(--chrome-2); }
.chip:hover { --lift: -6px; color: var(--chrome); }
.chip[aria-selected="true"], .chip.is-active { --lift: -16px; color: var(--chrome); border-color: var(--chip); }

/* puce de liste : petite bande de peinture */
.swatch-list { list-style: none; margin: 0; padding: 0; }
.swatch-list li { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.swatch-list li::before { content: ''; flex: none; width: 1.4rem; height: 0.35rem; border-radius: 2px; background: var(--chroma); transform: translateY(-0.2em); }

/* ---- Pastilles de choix / étiquettes (sentence case, jamais en majuscules) ---- */
.choice {
  --chip: var(--chroma);
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.95rem;
}
.choice input { accent-color: var(--chip); margin: 0; }
.choice:has(input:checked) { border-color: var(--chip); background: color-mix(in oklab, var(--chip) 14%, transparent); }
.tag {
  display: inline-block; font-size: 0.82rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  padding: 0.15rem 0.6rem; border-radius: var(--pill);
  border: 1px solid color-mix(in oklab, var(--chroma) 60%, transparent);
  background: color-mix(in oklab, var(--chroma) 14%, transparent);
  color: var(--chrome);
}
.tag-muted { border-color: var(--line); background: var(--ink-3); color: var(--chrome-2); }

/* ---- Formulaires ---- */
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; margin-bottom: 0.6rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > span, .field > label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--chrome-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"],
input[type="date"], input[type="password"], input[type="url"], input[type="file"], select, textarea {
  width: 100%; font: inherit; color: var(--chrome);
  background: var(--ink);
  border: 1px solid var(--chrome-3);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--chroma); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
::placeholder { color: var(--chrome-3); }  /* indice seulement : 3.2:1, jamais d'info indispensable */
input[type="checkbox"], input[type="radio"] { accent-color: var(--chroma); }
[aria-invalid="true"] { border-color: var(--err-line); }
.field-error { color: var(--err); font-size: 0.9rem; margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }

/* ---- Messages ---- */
.notice { padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--line); background: var(--ink-2); }
.notice.ok  { background: color-mix(in oklab, var(--chroma) 18%, var(--ink)); border-color: var(--chroma); }
.notice.err { background: var(--err-bg); border-color: var(--err-line); }

/* ---- Cartes ---- */
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-top: 2px solid var(--chroma);
  border-radius: 4px;
  padding: 1.25rem 1.4rem;
}
.card > h3 { margin-bottom: 0.5rem; }
.card-quiet { border-top-color: var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; }

/* ---- Tableaux ---- */
.table-wrap { overflow-x: auto; }
.mma-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.mma-table th, .mma-table td { text-align: left; vertical-align: top; padding: 0.65rem 1rem 0.65rem 0.75rem; border-bottom: 1px solid var(--line); }
.mma-table thead th {
  position: sticky; top: 0;
  background: var(--ink-3);
  font-family: var(--display); font-weight: 700; font-stretch: 115%; font-size: 0.95rem;
  color: var(--chrome);
  border-bottom: 2px solid var(--chroma);
}
.mma-table tbody tr:hover { background: var(--ink-2); }
.mma-table .num { text-align: right; }
.mma-table td.num, .mma-table td.code { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.code { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }
.mma-table tbody th { color: var(--chrome-2); font-weight: 600; }

/* ---- Pied de page ---- */
.mma-footer { border-top: 1px solid var(--line); padding: 2rem var(--gutter) 3rem; color: var(--chrome-2); font-size: 0.95rem; }
.mma-footer p { margin: 0 0 0.25rem; }
.mma-footer .mma-wordmark { font-size: 1.1rem; }

/* ---- Écrans étroits ---- */
@media (max-width: 720px) {
  .mma-nav { gap: 0.25rem 0.9rem; justify-content: flex-start; } /* links wrap; never hide navigation without a menu */
  .mma-brand .mma-wordmark em { display: none; }
  .chip-fan { overflow-x: auto; padding: 1.25rem 0.25rem 0.75rem; scroll-snap-type: x mandatory; }
  .chip-fan .chip { flex: 0 0 7.5rem; transform: translateY(var(--lift)); scroll-snap-align: start; }
  .chip-swatch { height: 5.5rem; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 2.1rem; font-stretch: 115%; }
}
@media (prefers-reduced-motion: reduce) {
  body, .mma-logo, .mma-icon, .chip { transition: none; }
}

/* ---- Impression : papier blanc, encre noire, accents foncés (≥ 4.6:1 sur blanc) ---- */
@media print {
  :root { --c-auto: #9f40f4; --c-ind: #966e07; --c-com: #168095; --c-pou: #45831d; --c-par: #e41f11; }
  body { background: #fff; color: var(--ink); font-size: 11pt; }
  .lead, .muted, .mma-footer, .chip-name, .mma-table tbody th { color: #43454d; }
  .card, .mma-table thead th, .notice { background: #fff; color: var(--ink); }
  .mma-header { position: static; background: #fff; backdrop-filter: none; }
  .mma-wordmark { color: var(--ink); }
  .btn { border: 1px solid var(--ink); }
}

/* Touch screens (theme): 44px targets for header, language switch and footer links */
@media (pointer: coarse) {
  .mma-brand { min-height: 44px; }
  .mma-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  .mma-footer a { display: inline-block; padding-block: 0.75rem; }
}
