/*
 * Site de Juggleon Studio (SITE-01, identité visuelle SITE-02).
 * Identité visuelle créée par Aurélie (planche « Identité visuelle Juggleon
 * Studio » et son maquettage du site) : palette, dégradé, Poppins.
 * Toutes les valeurs (couleurs, tailles, rayons, durées) vivent ici, dans
 * :root, et nulle part ailleurs. Contrastes WCAG notés à côté des couleurs de
 * texte (texte courant >= 4,5:1, gros texte >= 3:1).
 */

/* Poppins (SIL Open Font License 1.1, assets/fonts/Poppins-OFL.txt), fichiers
   locaux : aucune police chargée depuis un serveur externe. */
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette de la planche d'Aurélie. */
  --night: #0b0f2d; /* bleu nuit, fond principal */
  --fuchsia: #e6007e; /* 4,2:1 sur nuit et sur ivoire : jamais en texte courant */
  --violet: #8a00b8; /* 2,5:1 sur nuit : jamais en texte sur fond sombre ; 7,1:1 sur ivoire */
  --rose: #ff4d8d; /* liens sur fond sombre : 6,0:1 sur nuit */
  --orange: #ff7a3d; /* emplacements réservés : 7,2:1 sur nuit */
  --ivory: #f9f7ff; /* texte sur nuit : 17,6:1 ; fond des sections claires */

  /* Dégradé officiel de la marque (barres décoratives). */
  --gradient: linear-gradient(110deg, #8a00b8 0%, #e6007e 45%, #ff4d8d 72%, #ff7a3d 100%);
  /* Ajustements de contraste (SITE-02) : le dégradé officiel commence par le
     violet, trop sombre sur nuit (2,5:1), et finit par le rose et l'orange,
     trop clairs sur ivoire (3,0:1 et 2,4:1). Pour du texte, on n'en garde que
     la partie lisible, et seulement en gros texte (>= 3:1). */
  --gradient-text-dark: linear-gradient(110deg, #e6007e 0%, #ff4d8d 50%, #ff7a3d 100%); /* 4,2 à 7,2:1 sur nuit */
  --gradient-text-light: linear-gradient(110deg, #8a00b8 0%, #e6007e 100%); /* 7,1 à 4,2:1 sur ivoire */
  /* Bouton : texte blanc de 7,6:1 (violet) à 4,5:1 (fuchsia) ; le rose et
     l'orange (3,1:1 et 2,6:1 sous un texte blanc) sont exclus. */
  --gradient-button: linear-gradient(110deg, #8a00b8 0%, #e6007e 100%);
  --button-text: #ffffff; /* blanc de la maquette : l'ivoire ne fait que 4,2:1 sur fuchsia */

  /* Teintes secondaires du maquettage d'Aurélie. */
  --night-deep: #080b22; /* fond du pied de page */
  --rose-light: #ff8ab9; /* surtitres sur fond sombre : 8,6:1 sur nuit, 6,0:1 au plus clair du bloc contact */
  --text-soft: #dcd7ef; /* chapeau sur nuit : 13,4:1 */
  --text-muted: #bdb8d5; /* texte secondaire sur nuit : 9,8:1 */
  --text-muted-light: #545575; /* texte secondaire sur ivoire : 6,7:1 */
  --card: #ffffff; /* cartes des sections claires */
  --card-border: #e7e1ef;
  --line-dark: #ffffff22; /* filets sur fond sombre */
  --pill-border: #ffffff80; /* contour des boutons secondaires */
  --plum: #48035e; /* halo derrière le logo */
  --panel-start: #210b44; /* bloc contact */
  --panel-end: #5a0759;
  --glow-violet: #8a00b84d;
  --glow-fuchsia: #e6007e35;
  --ring: #ff4d8d55; /* cercles décoratifs */
  --mini-bg: #1a103c;
  --mini-border: #ffffff38;
  --shadow-card: 0 12px 30px #0b0f2d0b;
  --shadow-logo: drop-shadow(0 24px 35px #00000088);

  /* Espacements (grille de 4). */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-panel: 64px;
  --section-pad: clamp(64px, 9vw, 104px);

  /* Rayons. */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 999px;

  --focus-width: 3px;

  /* Cible tactile minimale (JosSizes.minTapTarget). */
  --tap-target: 48px;

  /* Largeurs. */
  --page-max: 72rem;
  --read-max: 40rem;
  --head-max: 48rem;
  --logo-header-width: 170px;
  --logo-hero-width: 520px;

  /* Mouvement. */
  --motion-fast: 120ms;
  --motion-standard: cubic-bezier(0.215, 0.61, 0.355, 1);

  --font: "Poppins", system-ui, sans-serif;

  /* Couleur du contour de focus, changée sur les sections claires. */
  --focus: var(--rose);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* Largeur de page : le contenu reste fluide jusqu'à 360 px et moins. */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Lien d'évitement, visible au clavier seulement. */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-xxl) * 2);
  z-index: 2;
  padding: var(--space-sm) var(--space-md);
  background: var(--ivory);
  color: var(--night);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-md);
}

a {
  color: var(--rose);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ivory);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
}

h1 {
  font-size: clamp(1.875rem, 6vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
}

/* Texte en dégradé : gros texte seulement (contrastes dans :root). */
.text-gradient {
  background: var(--gradient-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.light .text-gradient {
  background: var(--gradient-text-light);
  -webkit-background-clip: text;
  background-clip: text;
}

/* En-tête : logo et changement de langue. */
.site-header {
  border-bottom: 1px solid var(--line-dark);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
}

.logo img {
  display: block;
  width: var(--logo-header-width);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0 var(--space-lg);
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  color: var(--ivory);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--motion-standard),
    color var(--motion-fast) var(--motion-standard);
}

.lang-switch:hover {
  background: var(--ivory);
  color: var(--night);
}

/* Sections. */
main section {
  padding: var(--space-xl) 0;
}

.hero {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
}

.lead {
  max-width: var(--read-max);
  font-size: 1.125rem;
  color: var(--text-soft);
}

/* Barre du dégradé officiel sous les titres. */
.accent-bar,
.line {
  width: 64px;
  height: 4px;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-sm);
  background: var(--gradient);
}

/* Accueil : grande accroche et logo sur halo. */
.hero-home {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 86% 35%, var(--glow-violet), transparent 43%),
    radial-gradient(ellipse at 18% 92%, var(--glow-fuchsia), transparent 48%), var(--night);
}

.hero-home::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -240px;
  width: 620px;
  height: 620px;
  border: 2px solid var(--ring);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-xxl);
  align-items: center;
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.hero-home h1 {
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: var(--space-md) 0 var(--space-lg);
}

.kicker,
.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.kicker {
  color: var(--rose-light);
}

.kicker .star {
  margin-right: var(--space-sm);
  color: var(--orange);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--tap-target);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  background: var(--gradient-button);
  color: var(--button-text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  color: var(--button-text);
  text-decoration: underline;
}

.btn-secondary {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--pill-border);
}

.art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.glow {
  position: absolute;
  inset: 8%;
  border-radius: 45% 55% 64% 36% / 43% 38% 62% 57%;
  background: radial-gradient(circle at 25% 82%, var(--orange), transparent 34%),
    radial-gradient(circle at 22% 20%, var(--fuchsia), transparent 50%), var(--plum);
  /* L'orange reste en bas à gauche, loin du « on » orangé du logo. */
  transform: rotate(-15deg);
}

.art img {
  position: relative;
  display: block;
  width: min(100%, var(--logo-hero-width));
  filter: var(--shadow-logo);
  transform: rotate(-5deg);
}

.spark {
  position: absolute;
  top: 0;
  right: 3%;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--rose);
  transform: rotate(16deg);
}

.mini {
  position: absolute;
  bottom: var(--space-xs);
  left: 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--mini-border);
  border-radius: var(--radius-md);
  background: var(--mini-bg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Sections claires (ivoire). */
.light {
  --focus: var(--violet);
  background: var(--ivory);
  color: var(--night);
}

.light a {
  color: var(--violet);
}

.light a:hover {
  color: var(--night);
}

.home section {
  padding: var(--section-pad) 0;
}

.home .section-follow {
  padding-top: 0;
}

.section-head {
  max-width: var(--head-max);
}

.section-head h2,
.contact-panel h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  letter-spacing: -0.035em;
  margin: var(--space-md) 0 var(--space-lg);
}

.light .eyebrow {
  color: var(--violet); /* 7,1:1 sur ivoire (le fuchsia de la maquette n'y fait que 4,2:1) */
}

.muted {
  color: var(--text-muted-light);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: var(--space-xl);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.card .symbol {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--fuchsia);
}

.card h3 {
  margin-top: var(--space-lg);
}

.card p {
  margin: 0;
  color: var(--text-muted-light);
}

/* Bloc contact : panneau sombre sur fond ivoire. */
.contact-panel {
  --focus: var(--rose);
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-xl), 6vw, var(--space-panel));
  border-radius: var(--radius-xl);
  background: linear-gradient(125deg, var(--panel-start), var(--night) 55%, var(--panel-end));
  color: var(--ivory);
}

.contact-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 3px solid var(--ring);
  border-radius: 50%;
  pointer-events: none;
}

.contact-panel > * {
  position: relative;
  z-index: 1;
}

.contact-panel .eyebrow {
  color: var(--rose-light);
}

.contact-panel p:not(.eyebrow) {
  max-width: var(--read-max);
  color: var(--text-soft);
}

.light .contact-panel .btn {
  max-width: 100%;
  color: var(--button-text);
  margin-top: var(--space-sm);
  /* L'adresse peut passer à la ligne sur un petit écran plutôt que d'être coupée. */
  overflow-wrap: anywhere;
}

/* Pied de page. */
.site-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--line-dark);
  background: var(--night-deep);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
}

.site-footer [aria-current="page"] {
  color: var(--ivory);
}

/* Pages légales (CONF-01) : texte long à largeur de lecture, aligné sur
   l'en-tête (la largeur se limite sur les blocs, pas sur .wrap). */
.legal > * {
  max-width: var(--read-max);
}

.legal section {
  padding: var(--space-md) 0;
}

.legal h2 {
  margin-top: var(--space-md);
}

.legal h3 {
  margin-top: var(--space-lg);
}

.legal ul {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-lg);
}

.legal li {
  margin-bottom: var(--space-sm);
}

.updated {
  color: var(--text-muted);
}

/* Sommaire : chaque lien garde une cible tactile de 48 px. */
.toc ul {
  margin: 0;
  padding-left: var(--space-lg);
}

.toc li {
  margin-bottom: 0;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
}

/* Emplacement réservé : reconnaissable par son texte entre crochets,
   la couleur et la graisse ne font que le souligner. */
.todo {
  color: var(--orange);
  font-weight: 700;
}

@media (max-width: 850px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .art {
    min-height: 300px;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .wrap {
    padding: 0 var(--space-md);
  }

  .hero-home h1 {
    font-size: 2.75rem;
  }

  .art {
    min-height: 240px;
  }

  .spark {
    font-size: 2.5rem;
  }

  .mini {
    font-size: 0.625rem;
  }

  .contact-panel {
    padding: var(--space-xl) var(--space-lg);
  }

  .contact-panel .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9375rem;
  }

  /* Le cercle décoratif passerait sous le texte. */
  .contact-panel::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
