/* ================================================================
   platinum.css — Surcouche "Mac OS 8/9 Platinum" (audit v14)
   Chargee APRES site.css + menubar.css. Additive et revertable.
   Approfondit le chrome System 7 existant vers le bevel 3D Platinum,
   en conservant la palette creme/orange/arc-en-ciel (PRODUCT.md).
   N'altere NI le hero, NI la carte des voyages, NI la logique JS.
   Contraste du texte inchange (fonds conserves) : a11y preservee.
   ================================================================ */

:root {
  /* Biseaux chauds : clair en haut-gauche, sombre en bas-droite */
  --plat-light:    rgba(255, 255, 255, 0.72);
  --plat-light-hi: rgba(255, 255, 255, 0.92);
  --plat-dark:     rgba(24, 20, 18, 0.22);
  --plat-darker:   rgba(24, 20, 18, 0.34);
  --plat-frame:    rgba(24, 20, 18, 0.55);   /* trait fin de cadre fenetre */
  /* Rayures de barre de titre (pinstripe System/Platinum) */
  --plat-stripe:   repeating-linear-gradient(
                     to bottom,
                     transparent 0 2px,
                     var(--light-gray) 2px 3px);
}

/* ===== 1. Ascenseurs Platinum (la signature « vieux Mac ») ===== */
/* WebKit/Blink : piste creusee, pouce biseaute strie. */
html { scrollbar-color: var(--warm-white) var(--paper); }   /* Firefox */
::-webkit-scrollbar { width: 15px; height: 15px; }
::-webkit-scrollbar-track {
  background: var(--paper);
  border-left: 1px solid var(--border);
  box-shadow: inset 1px 1px 0 var(--plat-dark);
}
::-webkit-scrollbar-thumb {
  background-color: var(--warm-white);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 2px, rgba(24,20,18,0.10) 2px 3px);
  border: 1px solid var(--plat-frame);
  border-top-color: var(--plat-light-hi);
  border-left-color: var(--plat-light-hi);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--paper); }
::-webkit-scrollbar-corner { background: var(--paper); }
/* Les scrollers fins existants (menu) gardent leur reglage : .mb-menus cache deja sa barre. */

/* ===== 2. Cartes = petites fenetres Platinum (bevel 3D) =====
   Technique par border-color (laisse box-shadow libre pour les hovers
   existants). Cadre fin + arete claire/sombre. */
.stat-card,
.edu-card,
.skill-cat,
.benev-card,
.pub-card,
.case-card,
.temo-card,
.faq-item {
  border-style: solid;
  border-width: 2px;
  border-color: var(--plat-light) var(--plat-dark) var(--plat-darker) var(--plat-light);
  background-clip: padding-box;
}
/* La carte temoignage est sombre : biseaux clairs adaptes */
.temo-card {
  border-color: rgba(250,247,240,0.22) rgba(0,0,0,0.38) rgba(0,0,0,0.5) rgba(250,247,240,0.22);
}

/* ===== 3. Boutons-poussoirs Platinum =====
   Arete lumineuse + ombre portee dure ; enfoncement au :active. */
.btn,
.rec-btn,
.cf-submit,
.faq-send {
  border-radius: var(--radius-sm, 3px);
  box-shadow:
    inset 1px 1px 0 var(--plat-light-hi),
    inset -1px -1px 0 var(--plat-dark),
    1px 2px 0 rgba(24,20,18,0.16);
}
.btn-secondary { box-shadow:
    inset 1px 1px 0 rgba(250,247,240,0.55),
    inset -1px -1px 0 var(--plat-dark),
    1px 2px 0 rgba(24,20,18,0.10); }
.faq-send { border-radius: var(--radius-sm, 3px); }   /* le rond devient touche carree Mac */
@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .rec-btn:hover {
    box-shadow:
      inset 1px 1px 0 var(--plat-light-hi),
      inset -1px -1px 0 var(--plat-dark),
      2px 3px 0 rgba(24,20,18,0.18);
  }
}
/* Pression : ombre portee absorbee, biseau inverse (enfonce) */
.btn:active,
.rec-btn:active,
.cf-submit:active,
.faq-send:active {
  box-shadow:
    inset 1px 1px 0 var(--plat-darker),
    inset -1px -1px 0 var(--plat-light);
}

/* ===== 4. Champs creuses (sunken well) — inverse du bouton ===== */
.cf-field input,
.cf-field textarea,
.faq-input {
  box-shadow:
    inset 1px 1px 0 var(--plat-dark),
    inset -1px -1px 0 var(--plat-light-hi);
}
.faq-input { border-radius: var(--radius-sm, 3px); }   /* la pilule devient champ Mac */

/* ===== 5. En-tetes de section : rappel de barre de titre ===== */
/* Fin liseré rayé sous le titre, echo du pinstripe des fenetres Finder. */
.section-header { position: relative; }
.section-header::after {
  content: "";
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  background: var(--plat-stripe);
  background-size: 100% 5px;
  opacity: 0.45;
  pointer-events: none;
}

/* ===== 6. Formulaire de contact = fenetre Platinum encadree ===== */
.cf-form {
  background: var(--color-surface-white);
  border: 1px solid var(--plat-frame);
  border-radius: var(--radius-md, 6px);
  box-shadow:
    inset 1px 1px 0 var(--plat-light-hi),
    inset -1px -1px 0 var(--plat-dark),
    3px 4px 0 rgba(24,20,18,0.12);
  padding: var(--space-5);
}

/* ===== Mode sombre : les biseaux rgba fonctionnent dans les deux modes,
   mais on renforce le cadre sombre pour rester lisible. ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --plat-light:    rgba(255,255,255,0.16);
    --plat-light-hi: rgba(255,255,255,0.22);
    --plat-dark:     rgba(0,0,0,0.40);
    --plat-darker:   rgba(0,0,0,0.55);
    --plat-frame:    rgba(0,0,0,0.6);
  }
}

/* ===== Garde mouvement : aucun mouvement ajoute ici ; les :active
   sont des retours de pression instantanes (acceptables). ===== */

/* ================================================================
   Bureau d'ordinateur (audit v14.1) : menu Gadz, icônes, boot.
   Logo Gadz = emblème système (jamais de pomme Apple).
   ================================================================ */

/* ===== Menu déroulant Gadz (le logo de la barre) ===== */
.gadz-menu-wrap { position: relative; flex-shrink: 0; display: flex; }
.gadz-menu-wrap > summary { list-style: none; cursor: var(--cur-hand, pointer); }
.gadz-menu-wrap > summary::-webkit-details-marker { display: none; }
.gadz-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 212px;
  margin: 0; padding: var(--space-1) 0; list-style: none;
  background: var(--cream); border: 1.5px solid var(--black); border-radius: 2px;
  box-shadow: 3px 3px 0 var(--black); z-index: calc(var(--z-nav, 200) + 10);
}
.gadz-item {
  display: flex; width: 100%; align-items: center; min-height: 36px; gap: 8px;
  padding: 7px var(--space-3-5); background: none; border: 0; text-align: left;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--fw-medium);
  letter-spacing: 0.1px; color: var(--black); text-decoration: none; white-space: nowrap;
  cursor: var(--cur-hand, pointer);
}
.gadz-item:hover { background: var(--black); color: var(--cream); }
.gadz-item:focus-visible { background: var(--black); color: var(--cream); outline: 2px solid var(--focus-outline); outline-offset: -2px; }
.gadz-sep { height: 0; margin: var(--space-1) var(--space-2-5); border-top: 1px solid var(--border); padding: 0; }
.egg-about-sub { font-family: var(--font-body); font-size: 0.8125rem; font-weight: var(--fw-bold); color: var(--black); margin: var(--space-3-5) 0 var(--space-1); }

/* ===== Icônes de bureau (décoratives, ≥1500px) ===== */
.desktop-icons {
  position: fixed; top: 62px; right: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
  pointer-events: none;
}
.desk-icon { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 76px; text-align: center; }
.desk-icon img { filter: drop-shadow(1px 2px 0 rgba(24, 20, 18, 0.18)); }
.desk-trash-svg { width: 34px; height: 42px; color: var(--charcoal); filter: drop-shadow(1px 2px 0 rgba(24, 20, 18, 0.12)); }
.desk-label {
  font-family: var(--font-body); font-size: var(--text-2xs, 0.8125rem); font-weight: var(--fw-semi);
  color: var(--charcoal); background: var(--cream); padding: 1px 6px; border-radius: 2px;
  box-shadow: 0 0 0 1px var(--border);
}
@media (max-width: 1499px) { .desktop-icons { display: none; } }

/* ===== Écran de démarrage ===== */
.boot {
  position: fixed; inset: 0; z-index: 9999; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  animation: bootHide 0s linear 1.25s forwards;
}
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: bootIn 0.3s ease-out; }
.boot-mac { width: min(240px, 62vw); height: auto; }
.boot-msg { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--font-body); font-size: var(--text-lg); font-weight: var(--fw-semi); color: var(--black); }
.boot-gadz { display: block; }
.boot-bar { width: 204px; height: 13px; background: var(--warm-white); border: 1.5px solid var(--black); border-radius: 2px; overflow: hidden; box-shadow: inset 1px 1px 0 rgba(24, 20, 18, 0.22); }
.boot-bar-fill { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--accent) 0 9px, var(--accent-bright) 9px 18px); animation: bootBar 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards; }
@keyframes bootBar { from { width: 0; } to { width: 100%; } }
@keyframes bootIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bootHide { to { opacity: 0; visibility: hidden; pointer-events: none; } }
html.mac-booted #boot { display: none !important; }
@media (prefers-reduced-motion: reduce) { #boot { display: none !important; } }


/* Menu Gadz : icônes + débordement */
.gadz-item img { width: 18px; height: 18px; flex-shrink: 0; image-rendering: pixelated; }
.gadz-menu { max-height: min(80vh, calc(100dvh - 60px)); overflow-y: auto; }
