/* ==========================================================================
   {EPITECH} — Design tokens
   Basé sur la charte graphique Epitech (palette triptyque, Anton /
   IBM Plex Sans / Space Mono, grille blueprint, pixels, accolades, balises).
   ========================================================================== */

:root {
  /* --- Palette officielle ------------------------------------------------ */
  --ep-blue:        #013AFB;  /* Bleu Epitech — couleur principale */
  --ep-tech:        #00FF97;  /* Triptyque TECH */
  --ep-together:    #FF5F3A;  /* Triptyque TOGETHER */
  --ep-tomorrow:    #FF1EF7;  /* Triptyque TOMORROW */
  --ep-ink:         #181818;  /* Noir profond */
  --ep-drift:       #7EB9A6;  /* Secondaire DRIFT */
  --ep-light:       #F2F4F8;  /* Fond clair */
  --ep-white:       #FFFFFF;

  /* --- Dérivés (interaction / hiérarchie) ------------------------------- */
  --ep-blue-deep:   #012BBE;
  --ep-blue-ink:    #01187A;
  --ep-blue-05:     rgba(1, 58, 251, 0.05);
  --ep-blue-10:     rgba(1, 58, 251, 0.10);
  --ep-blue-20:     rgba(1, 58, 251, 0.20);
  --ep-blue-50:     rgba(1, 58, 251, 0.50);
  --ep-grey:        #5A5A5A;
  --ep-grey-soft:   #8A8F99;
  --ep-line:        rgba(1, 58, 251, 0.18);
  --ep-line-ink:    rgba(24, 24, 24, 0.12);
  --ep-white-15:    rgba(255, 255, 255, 0.15);
  --ep-white-30:    rgba(255, 255, 255, 0.30);
  --ep-white-60:    rgba(255, 255, 255, 0.62);

  /* --- Typographie ------------------------------------------------------ */
  --ep-font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --ep-font-sans:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ep-font-mono:    "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ep-fs-display:  clamp(2.6rem, 7.2vw, 5.4rem);
  --ep-fs-h1:       clamp(2rem, 4.6vw, 3.4rem);
  --ep-fs-h2:       clamp(1.55rem, 3.1vw, 2.35rem);
  --ep-fs-h3:       clamp(1.15rem, 1.9vw, 1.45rem);
  --ep-fs-lead:     clamp(1rem, 1.35vw, 1.15rem);
  --ep-fs-body:     0.975rem;
  --ep-fs-sm:       0.875rem;
  --ep-fs-xs:       0.75rem;

  /* --- Espacements / rythme -------------------------------------------- */
  --ep-gutter:      clamp(1.15rem, 4vw, 3.5rem);
  --ep-max:         1200px;
  --ep-max-narrow:  760px;
  --ep-space-band:  clamp(2.75rem, 6vw, 5.5rem);

  /* --- Formes ----------------------------------------------------------- */
  --ep-radius:        0;              /* angles droits : signature de la marque */
  --ep-radius-braces: 30px 50px;      /* motif accolades { } */
  --ep-border:        1px solid var(--ep-line);
  --ep-shadow:        0 18px 44px rgba(1, 24, 122, 0.14);
  --ep-shadow-hard:   10px 10px 0 var(--ep-blue);

  /* --- Divers ----------------------------------------------------------- */
  --ep-ease:        cubic-bezier(.2, .7, .3, 1);
  --ep-t:           220ms var(--ep-ease);
}

/* Le triptyque, adressable par attribut : [data-accent="tech|together|tomorrow|blue"] */
[data-accent="blue"]     { --accent: var(--ep-blue);     --accent-ink: var(--ep-white); }
[data-accent="tech"]     { --accent: var(--ep-tech);     --accent-ink: var(--ep-ink); }
[data-accent="together"] { --accent: var(--ep-together); --accent-ink: var(--ep-ink); }
[data-accent="tomorrow"] { --accent: var(--ep-tomorrow); --accent-ink: var(--ep-white); }

/* ==========================================================================
   Reset minimal
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--ep-font-sans);
  font-size: var(--ep-fs-body);
  line-height: 1.6;
  color: var(--ep-ink);
  background: var(--ep-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--ep-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--ep-tomorrow);
  outline-offset: 3px;
}

.ep-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
/* Le lien d'évitement réapparaît dès qu'il reçoit le focus clavier. */
a.ep-sr:focus-visible {
  position: fixed; top: .5rem; left: .5rem;
  z-index: 100;
  width: auto; height: auto; clip: auto;
  padding: .8rem 1.2rem;
  background: var(--ep-ink); color: var(--ep-tech);
  font-size: var(--ep-fs-sm); font-weight: 700; text-transform: uppercase;
  text-decoration: none;
}

/* ==========================================================================
   Typographie de marque
   ========================================================================== */
.ep-display, .ep-h1, .ep-h2, .ep-h3 {
  font-family: var(--ep-font-display);
  font-weight: 400;
  text-transform: uppercase;
  /* Anton a des capitales hautes : sous 1.05, les accents des majuscules
     (É, À, Ç) sont rognés dès qu'un titre passe sur deux lignes. */
  line-height: 1.05;
  letter-spacing: .005em;
}
.ep-display { font-size: var(--ep-fs-display); }
.ep-h1      { font-size: var(--ep-fs-h1); }
.ep-h2      { font-size: var(--ep-fs-h2); }
.ep-h3      { font-size: var(--ep-fs-h3); line-height: 1.05; }

/* Titre « produit » : IBM Plex Sans bold, comme les cartes du site */
.ep-title {
  font-size: var(--ep-fs-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.ep-lead { font-size: var(--ep-fs-lead); line-height: 1.55; }
.ep-mono {
  font-family: var(--ep-font-mono);
  font-size: var(--ep-fs-xs);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* « Les codes du code » : underscore comme ponctuation de titre */
.u-us::after {
  content: "_";
  color: var(--ep-tech);
  margin-left: .12em;
  font-family: var(--ep-font-sans);
  font-weight: 700;
}
.u-us--blue::after     { color: var(--ep-blue); }
.u-us--together::after { color: var(--ep-together); }
.u-us--tomorrow::after { color: var(--ep-tomorrow); }
.u-us--accent::after   { color: var(--accent, var(--ep-tech)); }

/* Balises ouvrantes / fermantes autour d'un paragraphe */
.u-balise::before { content: "< ";  color: var(--ep-tech); }
.u-balise::after  { content: " />"; color: var(--ep-tech); }
.u-balise--blue::before, .u-balise--blue::after { color: var(--ep-blue); }

/* Surlignage vert des mots-clés de titre */
.u-mark {
  background: var(--ep-tech);
  color: var(--ep-ink);
  padding: 0 .18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ==========================================================================
   Grille blueprint + pixels (système graphique de la charte)
   ========================================================================== */
.u-blueprint {
  background-image:
    linear-gradient(to right, var(--ep-blue-10) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ep-blue-10) 1px, transparent 1px);
  background-size: 44px 44px;
}
.u-blueprint--light {
  background-image:
    linear-gradient(to right, var(--ep-white-15) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ep-white-15) 1px, transparent 1px);
  background-size: 44px 44px;
}

.u-pixels { position: relative; isolation: isolate; }
.u-pixels > .px {
  position: absolute;
  display: block;
  pointer-events: none;
  z-index: -1;
}

/* Motif accolades : deux demi-fonds avec un angle arrondi opposé */
.u-braces { position: relative; background: none !important; isolation: isolate; }
.u-braces::before,
.u-braces::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 auto;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--braces-bg, var(--ep-white));
  z-index: -1;
}
.u-braces::before { left: 0;  border-top-right-radius: var(--ep-radius-braces); }
.u-braces::after  { right: 0; border-top-left-radius:  var(--ep-radius-braces); }

/* ==========================================================================
   Boutons (uppercase, angles droits — comme sur epitech.eu)
   ========================================================================== */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 15px 2em;
  border: 2px solid transparent;
  border-radius: var(--ep-radius);
  font-size: var(--ep-fs-sm);
  font-weight: 700;
  letter-spacing: .56px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background var(--ep-t), color var(--ep-t), border-color var(--ep-t), transform var(--ep-t);
}
.ep-btn:hover  { transform: translateY(-2px); }
.ep-btn:active { transform: translateY(0); }
.ep-btn[disabled],
.ep-btn[aria-disabled="true"] {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
}

.ep-btn--tech  { background: var(--ep-tech);  color: var(--ep-ink);   border-color: var(--ep-tech); }
.ep-btn--tech:hover  { background: var(--ep-ink); color: var(--ep-tech); border-color: var(--ep-ink); }

.ep-btn--blue  { background: var(--ep-blue);  color: var(--ep-white); border-color: var(--ep-blue); }
.ep-btn--blue:hover  { background: var(--ep-blue-deep); border-color: var(--ep-blue-deep); }

.ep-btn--ink   { background: var(--ep-ink);   color: var(--ep-white); border-color: var(--ep-ink); }
.ep-btn--ink:hover   { background: var(--ep-blue); border-color: var(--ep-blue); }

.ep-btn--ghost { background: transparent; color: var(--ep-blue); border-color: var(--ep-blue); }
.ep-btn--ghost:hover { background: var(--ep-blue); color: var(--ep-white); }

.ep-btn--ghost-light { background: transparent; color: var(--ep-white); border-color: var(--ep-white-30); }
.ep-btn--ghost-light:hover { background: var(--ep-white); color: var(--ep-blue); border-color: var(--ep-white); }

.ep-btn--sm { padding: 10px 1.35em; font-size: var(--ep-fs-xs); }
.ep-btn--lg { padding: 19px 2.6em; font-size: var(--ep-fs-body); }

/* Lien fléché « EN SAVOIR PLUS → » */
.ep-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--ep-fs-sm);
  font-weight: 700;
  letter-spacing: .56px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ep-blue);
}
.ep-link .arw { transition: transform var(--ep-t); }
.ep-link:hover .arw { transform: translateX(6px); }
.ep-link--light { color: var(--ep-white); }

/* ==========================================================================
   Tags / chips
   ========================================================================== */
.ep-tag {
  display: inline-block;
  padding: 5px 10px;
  background: var(--ep-tech);
  color: var(--ep-ink);
  font-size: var(--ep-fs-xs);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
}
.ep-tag--blue     { background: var(--ep-blue); color: var(--ep-white); }
.ep-tag--together { background: var(--ep-together); color: var(--ep-ink); }
.ep-tag--tomorrow { background: var(--ep-tomorrow); color: var(--ep-white); }
.ep-tag--accent   { background: var(--accent, var(--ep-blue)); color: var(--accent-ink, var(--ep-white)); }
.ep-tag--outline  { background: transparent; color: var(--ep-blue); box-shadow: inset 0 0 0 1px var(--ep-line); }
.ep-tag--glass    { background: rgba(255, 255, 255, .16); color: var(--ep-white); }
.ep-tag--warn     { background: transparent; color: var(--ep-together); box-shadow: inset 0 0 0 1px var(--ep-together); }

.ep-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 5px 10px;
  background: var(--ep-white);
  box-shadow: inset 0 0 0 1px var(--ep-line);
  color: var(--ep-blue);
  font-family: var(--ep-font-mono);
  font-size: var(--ep-fs-xs);
  text-decoration: none;
  transition: background var(--ep-t), color var(--ep-t);
}
a.ep-chip:hover { background: var(--ep-blue); color: var(--ep-white); }

/* ==========================================================================
   Layout
   ========================================================================== */
.ep-wrap {
  width: 100%;
  max-width: var(--ep-max);
  margin-inline: auto;
  padding-inline: var(--ep-gutter);
}
.ep-wrap--narrow { max-width: var(--ep-max-narrow); }

.ep-band { padding-block: var(--ep-space-band); }
.ep-band--blue  { background: var(--ep-blue); color: var(--ep-white); }
.ep-band--ink   { background: var(--ep-ink);  color: var(--ep-white); }
.ep-band--white { background: var(--ep-white); }

.ep-band--blue a  { color: var(--ep-tech); }
.ep-band--blue .u-balise::before,
.ep-band--blue .u-balise::after { color: var(--ep-tech); }
