/* ALTek Links — page publique.
   Monochrome, sombre par défaut, polices système, aucune dépendance. */

/* ---------------------------------------------------------------- Thème -- */

:root {
  --accent: #e9eaea;            /* surchargé en ligne depuis les réglages */

  --bg:        #f6f6f7;
  --bg-glow:   rgba(0, 0, 0, .05);
  --surface:   #ffffff;
  --surface-h: #fbfbfc;
  --border:    #e4e4e7;
  --border-h:  #c9c9d0;
  --text:      #16161a;
  --dim:       #6b6b74;
  --grid:      rgba(0, 0, 0, .035);
  --shadow:    0 1px 2px rgba(16, 16, 20, .05), 0 8px 24px rgba(16, 16, 20, .06);

  /* En clair, l'accent est assombri pour rester lisible quelle que soit
     la couleur choisie dans l'administration. */
  --ink:    color-mix(in oklab, var(--accent) 100%, #101014 72%);
  --ring:   color-mix(in oklab, var(--accent) 100%, #101014 55%);
  --cta-bg: var(--ink);
  --cta-fg: #ffffff;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b0b0c;
    --bg-glow:   rgba(255, 255, 255, .06);
    --surface:   #161618;
    --surface-h: #1e1e21;
    --border:    #26262a;
    --border-h:  #3c3c43;
    --text:      #ececed;
    --dim:       #8a8a92;
    --grid:      rgba(255, 255, 255, .032);
    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);

    --ink:    var(--accent);
    --ring:   var(--accent);
    --cta-bg: var(--accent);
    --cta-fg: #0b0b0c;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:        #0b0b0c;
  --bg-glow:   rgba(255, 255, 255, .06);
  --surface:   #161618;
  --surface-h: #1e1e21;
  --border:    #26262a;
  --border-h:  #3c3c43;
  --text:      #ececed;
  --dim:       #8a8a92;
  --grid:      rgba(255, 255, 255, .032);
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);

  --ink:    var(--accent);
  --ring:   var(--accent);
  --cta-bg: var(--accent);
  --cta-fg: #0b0b0c;

  color-scheme: dark;
}

/* ------------------------------------------------------------- Ossature -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 4rem) 16px calc(3rem + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grille technique, estompée vers le bas. Purement décorative. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, var(--bg-glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 35%, transparent 100%);
}

body.no-grid::before { display: none; }

.wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ico { width: 22px; height: 22px; flex: none; }

/* --------------------------------------------------------------- Entête -- */

.id { text-align: center; margin-bottom: 2rem; }

.id__avatar {
  width: 96px; height: 96px;
  margin: 0 auto .95rem;
  display: block;
  object-fit: cover;
  border-radius: 24px;                     /* carré arrondi, comme le logo */
  border: 1px solid color-mix(in oklab, var(--ink) 28%, var(--border));
  background: var(--surface);
  box-shadow: var(--shadow);
}

.id__monogram {
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 650;
  letter-spacing: -.04em;
  color: var(--text);
}

.id__name {
  margin: 0 0 .4rem;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 640;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.id__tagline {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--dim);
  font-size: .95rem;
  text-wrap: balance;
}

/* --------------------------------------------------------------- Blocs --- */

.sec {
  margin: 1.9rem 0 .8rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
}
.sec:first-child { margin-top: 0; }

.txt {
  margin: 0 0 .9rem;
  color: var(--dim);
  font-size: .94rem;
}

.sep {
  height: 1px;
  margin: 1.6rem 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border-h), transparent);
}

.pic-wrap { margin: 0 0 .7rem; }
.pic {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

/* -------------------------------------------------------------- Boutons -- */

.btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 60px;
  margin-bottom: .7rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

/* L'accent se manifeste au survol et au focus, même sans bouton mis en avant :
   sans cela, changer la couleur ne produirait aucun effet visible. */
.btn:hover {
  background: var(--surface-h);
  border-color: color-mix(in oklab, var(--ink) 38%, var(--border-h));
  transform: translateY(-2px);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.btn__text { flex: 1; min-width: 0; }

.btn__label {
  display: block;
  font-weight: 550;
  font-size: 1rem;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.btn__note {
  display: block;
  margin-top: .1rem;
  font-size: .8rem;
  color: var(--dim);
  overflow-wrap: anywhere;
}

.btn__icon--empty { width: 22px; height: 22px; }

.btn__chevron {
  width: 18px; height: 18px;
  color: var(--dim);
  transition: transform .16s ease;
}
.btn:hover .btn__chevron { transform: translateX(3px); color: var(--ink); }

/* Bouton mis en avant : seul élément qui porte l'accent en aplat. */
.btn--primary {
  background: var(--cta-bg);
  border-color: transparent;
  color: var(--cta-fg);
}
.btn--primary:hover {
  background: var(--cta-bg);
  border-color: transparent;
  filter: brightness(1.07);
}
.btn--primary .btn__note,
.btn--primary .btn__chevron { color: inherit; opacity: .72; }

/* --------------------------------------------------------- Vidéo unique -- */

.embed { margin: 0 0 .9rem; }

.embed__link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.embed__link:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.embed__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .3s ease;
}
.embed__link:hover .embed__thumb { transform: scale(1.03); }

.embed__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(8, 8, 10, .35);
  transition: background-color .2s ease;
}
.embed__play .ico { width: 54px; height: 54px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.5)); }
.embed__link:hover .embed__play { background: rgba(8, 8, 10, .18); }

.embed__caption {
  margin: .5rem 0 0;
  font-size: .88rem;
  color: var(--dim);
}

.embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 14px;
}

/* ---------------------------------------------------- Dernières vidéos --- */

.vid {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .55rem;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.vid:hover {
  background: var(--surface-h);
  border-color: color-mix(in oklab, var(--ink) 38%, var(--border-h));
  transform: translateY(-2px);
}
.vid:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.vid__thumb {
  width: 112px;
  height: 63px;
  flex: none;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-h);
}

.vid__body { min-width: 0; }

.vid__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 520;
  line-height: 1.35;
}

.vid__date {
  display: block;
  margin-top: .2rem;
  font-size: .78rem;
  color: var(--dim);
}

.videos__all {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  margin-top: .35rem;
  padding: .3rem 0;
  color: var(--dim);
  font-size: .85rem;
  text-decoration: none;
}
.videos__all:hover { color: var(--ink); }
.videos__all .ico { width: 15px; height: 15px; }
.videos__all:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

/* ----------------------------------------------------- Bascule de thème -- */

.theme {
  position: absolute;
  top: 16px; right: 16px;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--dim);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.theme:hover { color: var(--text); border-color: var(--border-h); }
.theme:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.theme .ico { width: 18px; height: 18px; }
.theme [data-when="dark"] { display: none; }
:root[data-theme="dark"] .theme [data-when="dark"],
:root:not([data-theme="light"]) .theme [data-when="dark"] { display: block; }
:root[data-theme="dark"] .theme [data-when="light"] { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme [data-when="light"] { display: none; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme [data-when="dark"] { display: none; }
  :root:not([data-theme="dark"]) .theme [data-when="light"] { display: block; }
}

/* --------------------------------------------------------------- Pied ---- */

.foot {
  margin-top: 2.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--dim);
}
.foot a { color: inherit; }

/* ------------------------------------------------------------ Mobile ----- */

@media (max-width: 420px) {
  .btn { min-height: 56px; gap: .7rem; }
  .vid__thumb { width: 96px; height: 54px; }
  .id__avatar { width: 84px; height: 84px; border-radius: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .btn:hover, .vid:hover { transform: none; }
}

@media print {
  body::before, .theme { display: none; }
  .btn, .vid { box-shadow: none; }
}
