/* Brand Cards - direction « Affiche » de Business Card, déclinée par marque.
   Référence visuelle : .product-architect/golden/ (validée par Pascal le 30/11/2026). */

/* Polices embarquées (IBM Plex, licence OFL) : l'app ne charge rien d'ailleurs. */
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("polices/plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("polices/plex-sans-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("polices/plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("polices/plex-sans-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("polices/plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("polices/plex-sans-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("polices/plex-sans-condensed-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("polices/plex-sans-condensed-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

/* Jetons de Business Card, repris tels quels. Changent : --field, posé par la marque (le bleu électrique
   de LED Studio en attendant) ; --fs-name, un cran plus bas (le logo prend le haut) ; --qr-pad et
   --row-pad, resserrés pour rendre au code la place du logo et du choix de la marque. */
:root {
  /* primitives */
  --electrique: #0304B8;
  --white: #FFFFFF;
  --ink: #0E1420;
  --steel: #556070;
  --mist: #DCE1EA;
  --fog: #EEF1F6;
  --pewter: #8A93A3;
  --brick: #A8261C;
  /* rôles ; --field, --on-field et --accent sont posés par l'app d'après la couleur de la carte.
     --field s'écrit en clair, sans renvoi : app.js lit cette valeur pour savoir quelle couleur Safari a
     prise pour sa barre au premier affichage (avant.js la remplace par celle de la carte gardée). */
  --field: #0304B8;
  --on-field: var(--white);
  --accent: var(--electrique);
  --on-accent: var(--white);
  --canvas: var(--white);
  --surface: var(--white);
  --text: var(--ink);
  --text-muted: var(--steel);
  --line: var(--mist);
  --input-line: var(--pewter);
  --tag-bg: var(--fog);
  --danger: var(--brick);
  /* espacement */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  /* typographie */
  --fs-xs: 13px;
  --fs-sm: 16px;
  --fs-md: 20px;
  --fs-xl: 31px;
  --fs-name: 49px;
  --radius-sm: 4px;
  --radius-pill: 999px;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  /* la carte : réglages que les petits écrans resserrent plus bas */
  --overlap: 96px;
  --qr-max: 264px;
  --qr-pad: var(--space-md);
  --row-pad: var(--space-xs);
  /* Une hauteur par forme de logo, pour un même poids à l'œil : bloc presque carré (LED Studio),
     cocarde ronde (La Maison), logotype en ligne (FilmPro). */
  --logo-h: 40px;
  --logo-cocarde-h: 44px;
  --logo-ligne-h: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* Le fond de la page est la couleur de la carte, pas le blanc : sur l'écran d'accueil, iOS teinte
   avec ce fond le voile qu'il pose sous l'heure et la batterie (leçon de Business Card, 26/11/2026). */
html, body { height: 100%; background: var(--field); }
/* La page elle-même ne défile jamais et ne rebondit pas quand on la tire : seul le formulaire de
   « Modifier » défile, dans sa zone. */
html { overflow: hidden; overscroll-behavior: none; }
body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-sm);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Sans script, la page n'a que son fond de couleur : le message y prend l'encre posée sur cette couleur. */
.noscript { padding: var(--space-lg); color: var(--on-field); }

/* Boutons : chacun porte son contour et son arrondi */
button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-sm);
  touch-action: manipulation;
}
button:focus-visible, input:focus-visible, textarea:focus-visible, .wheel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.outline {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
}
.solid {
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
}
.with-icon { display: inline-flex; align-items: center; gap: var(--space-xs); }
.with-icon svg { width: 20px; height: 20px; }
/* Groupe segmenté, commun à FR / EN et au choix de la marque : le groupe ne dessine rien, chaque
   bouton porte son contour. */
.seg-btn {
  min-width: 48px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 0;
}
.seg-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg-btn + .seg-btn { margin-left: -1px; }
.seg-btn[aria-pressed="true"] {
  position: relative;
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- La carte : un seul écran, jamais de défilement sur un iPhone tenu debout ---------- */
/* Le plancher de 520 px ne joue que sur un écran très court (téléphone couché) : la page défile alors
   plutôt que de cacher un bouton. */
.card {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}
.card > * { flex-shrink: 0; }
.card > .body { flex-shrink: 1; }
/* Le logo commence 32 px sous la zone de l'heure et de la batterie : sur l'écran d'accueil, la page
   passe dessous, et iOS y pose un voile qui déborde un peu plus bas que la zone elle-même. */
.field {
  background: var(--field);
  color: var(--on-field);
  padding: calc(var(--safe-top) + var(--space-xl)) var(--space-lg) calc(var(--overlap) + var(--space-lg));
}
/* Le logo officiel de la marque, au-dessus du nom ; le logotype en ligne garde la même hauteur de bloc
   que les deux autres (marges haute et basse), pour que le nom tombe au même endroit. */
.logo { display: block; width: auto; max-width: 100%; height: var(--logo-h); margin-bottom: var(--space-md); }
.logo-cocarde { height: var(--logo-cocarde-h); }
.logo-ligne { height: var(--logo-ligne-h); margin-top: var(--space-xs); margin-bottom: var(--space-lg); }
.name {
  font-family: var(--font-display);
  font-size: var(--fs-name);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.name span { display: block; white-space: nowrap; }
.name-wrap span { white-space: normal; overflow-wrap: anywhere; }
.org { margin-top: var(--space-sm); }
.org span { display: block; overflow-wrap: anywhere; }
.org-lead { font-size: var(--fs-md); font-weight: 500; line-height: 1.3; }
.org-rest { opacity: 0.86; text-wrap: pretty; }
/* impeccable-disable cramped-padding : la marge du bas est max(zone basse de l'iPhone, 24 px), celle de Business Card */
.body {
  flex: 1;
  min-height: 0;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-lg) max(var(--safe-bottom), var(--space-lg));
}
/* La zone du code cède de la place quand la carte se remplit : le code rétrécit, rien ne défile. */
.scan {
  flex: 0 1 calc(var(--qr-max) - var(--overlap));
  min-height: 72px;
  container-type: size;
}
/* impeccable-disable dark-glow : ombre du code teintée de la couleur de la carte, validée sur Business Card le 26/11 */
.qr {
  position: relative;
  width: min(var(--qr-max), calc(100cqh + var(--overlap)));
  aspect-ratio: 1;
  margin-top: calc(-1 * var(--overlap));
  margin-left: auto;
  padding: var(--qr-pad);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow:
    0 0 0 1px rgba(14, 20, 32, 0.06),
    0 24px 32px -24px color-mix(in srgb, var(--field) 55%, transparent);
}
/* Hauteur automatique, pas 100 % : un pourcentage se calculait sur le carré entier, marges comprises,
   et le code débordait vers le bas (leçon de Business Card, 26/11). */
.qr svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.contact {
  margin-top: var(--space-lg);
  border-top: 1px solid var(--line);
}
.contact-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: baseline;
  padding: var(--row-pad) 0;
  border-bottom: 1px solid var(--line);
}
.contact-row dt {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-row dd { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }
/* Pas encore de carte pour cette marque : le logo sur sa couleur, une phrase et un bouton, sans code. */
.card-empty .field { padding-bottom: var(--space-lg); }
.empty { padding-top: var(--space-xl); }
.empty-text { font-size: var(--fs-md); font-weight: 500; line-height: 1.3; }
.empty .solid { width: 100%; min-height: 48px; margin-top: var(--space-lg); }
/* Le choix de la marque, en bas, sous le pouce ; puis FR / EN et Modifier, comme Business Card. */
.brands { display: flex; margin-top: auto; padding-top: var(--space-lg); }
.brands .seg-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.controls {
  padding-top: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lang { display: flex; }

/* Écrans courts : on resserre par paliers, sans sortir des échelles. Sous 720 px, la ligne « Site »
   quitte l'écran (le site reste dans le contact) pour que le code garde au moins 150 px (AC-B5).
   720 et non 700 (le modèle) : un iPhone 17 Pro dans un onglet Safari, avant installation, fait 714 px
   de haut, et y montrait un code de 118 px (simulateur, 30.11.2026). */
@media (max-height: 800px) {
  :root { --fs-name: 39px; --overlap: 64px; --logo-h: 32px; --logo-cocarde-h: 36px; --logo-ligne-h: 20px; }
}
@media (max-height: 720px) {
  :root { --fs-name: 31px; --qr-pad: var(--space-sm); --row-pad: var(--space-2xs); }
  .field { padding-top: calc(var(--safe-top) + var(--space-md)); }
  .logo { margin-bottom: var(--space-xs); }
  .logo-ligne { margin-top: var(--space-2xs); margin-bottom: var(--space-sm); }
  .org { margin-top: var(--space-xs); }
  .contact { margin-top: var(--space-md); }
  .contact-row[data-cle="site"] { display: none; }
  .brands { padding-top: var(--space-md); }
  .controls { padding-top: var(--space-xs); }
}
/* Le plus petit iPhone dans un onglet Safari, avant installation (375 x 549, simulateur, 30.11.2026) :
   FR / EN et Modifier passaient sous la barre de Safari. Tout se resserre d'un cran, et la description
   de la marque quitte l'écran (le logo nomme la marque ; la description reste dans le contact). */
@media (max-height: 600px) {
  :root { --fs-name: 28px; --logo-h: 24px; --logo-cocarde-h: 28px; --logo-ligne-h: 16px; }
  .field { padding-top: calc(var(--safe-top) + var(--space-xs)); }
  .org-rest { display: none !important; }
  .contact { margin-top: var(--space-sm); }
  .brands { padding-top: var(--space-xs); }
}

/* ---------- Modifier ---------- */
.sheet {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* Le formulaire défile dans sa zone ; la barre des deux boutons reste en bas, hors du défilement. */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--canvas); }
.head {
  background: var(--field);
  color: var(--on-field);
  padding: calc(var(--safe-top) + var(--space-xl)) var(--space-lg) var(--space-lg);
}
.head h1 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.head p { margin-top: var(--space-xs); opacity: 0.86; }
form { padding: var(--space-lg) var(--space-lg) var(--space-xl); }
fieldset { border: 0; min-width: 0; }
fieldset + fieldset { margin-top: var(--space-xl); }
legend {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}
.row + .row { margin-top: var(--space-md); }
label, .label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2xs);
}
.optional { letter-spacing: 0; text-transform: none; font-weight: 400; }
.hint { margin-top: var(--space-2xs); font-size: var(--fs-xs); color: var(--text-muted); }
input[type="text"], input[type="tel"], input[type="email"], input[type="url"] {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 var(--space-md);
  font: inherit;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
}
/* La description d'une marque tient sur deux lignes : dans un champ d'une ligne, on n'en lisait que le début. */
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: var(--space-sm) var(--space-md);
  font: inherit;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-sm);
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--pewter); opacity: 1; }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error, .alert {
  margin-top: var(--space-2xs);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--danger);
}
.alert {
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
}
.note {
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--tag-bg);
  border-radius: var(--radius-sm);
}
.qr-error { font-size: var(--fs-xs); font-weight: 500; color: var(--danger); }
/* Sur la carte, un message ponctuel (un lien qui n'apportait rien de neuf) : sous les coordonnées, il
   disparaît au geste suivant. */
.body .note { margin: var(--space-md) 0 0; font-size: var(--fs-xs); }
/* Revenir au site ou à la description de la marque, comme « Revenir à la couleur de la marque ». */
.reprendre { margin-top: var(--space-xs); }
/* Champ en deux langues : l'étiquette de langue porte son propre contour, collé à celui du champ. */
.bilingual { display: flex; }
.bilingual + .bilingual { margin-top: var(--space-xs); }
.bilingual .tag {
  flex: none;
  width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--tag-bg);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.bilingual input, .bilingual textarea {
  margin-left: -1px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Couleur : la roue donne la teinte et l'intensité, la réglette le clair ou le foncé. */
.color { display: flex; flex-direction: column; align-items: center; }
.wheel {
  position: relative;
  width: 208px;
  height: 208px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
    conic-gradient(from 90deg, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%));
  box-shadow: 0 0 0 1px rgba(14, 20, 32, 0.12);
  touch-action: none;
  cursor: crosshair;
}
.knob {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--field);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px rgba(14, 20, 32, 0.3), 0 4px 8px rgba(14, 20, 32, 0.25);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.shade { width: 100%; margin-top: var(--space-lg); }
.shade input {
  display: block;
  width: 100%;
  height: 44px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.shade input::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--piste, linear-gradient(90deg, #C7C8F0, #0304B8 62%, #010148));
  box-shadow: inset 0 0 0 1px rgba(14, 20, 32, 0.12);
}
.shade input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--field);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px rgba(14, 20, 32, 0.3), 0 4px 8px rgba(14, 20, 32, 0.25);
}
.shade input::-moz-range-track {
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--piste, linear-gradient(90deg, #C7C8F0, #0304B8 62%, #010148));
  box-shadow: inset 0 0 0 1px rgba(14, 20, 32, 0.12);
}
.shade input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--field);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px rgba(14, 20, 32, 0.3), 0 4px 8px rgba(14, 20, 32, 0.25);
}
.shade-ends {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.reset { margin-top: var(--space-lg); }
.bar {
  flex: none;
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg) max(var(--safe-bottom), var(--space-lg));
  background: var(--canvas);
  border-top: 1px solid var(--line);
}
.bar .outline { flex: 1; }
.bar .solid { flex: 2; }
