/* =========================================================
   IslemTech | thème clair et coloré, esprit "stickers"
   Bleu nuit + rose, avec le jaune et l'orange d'origine
   ========================================================= */

:root {
  --paper: #fbfbf9;
  --grid: #ecece8;
  --ink: #00103d; /* bleu nuit : textes et grands titres */
  --ink-soft: #47527a;
  --pink: #ff6fb0;
  --pink-soft: #fbe6ee;
  --green: #2fbf7a;
  --yellow: #ffd469;
  --orange: #fc991a;
  --cream: #fff4e3;
  --white: #ffffff;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav: 68px;
  --radius: 26px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--pink);
  color: var(--white);
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--white);
}

.skip:focus {
  left: 8px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Fond quadrillé très léger, comme une feuille de carnet */
.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 84px 84px;
}

/* ---------- Menu ---------- */

.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(var(--wrap), calc(100% - 24px));
  height: 56px;
  padding: 0 10px 0 22px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 2px solid var(--ink);
  border-radius: 99px;
  transform: translateX(-50%);
  box-shadow: 0 5px 0 var(--ink);
}

.nav__logo {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo span,
.footer__big span,
h1 span {
  color: var(--pink);
}

.nav__links {
  display: flex;
  gap: 2px;
  margin: 0 auto;
}

.nav__links a {
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.nav__links a:hover,
.nav__links a.is-active {
  background: var(--pink-soft);
}

.nav__burger {
  display: none;
  margin-left: auto;
  padding: 7px 14px;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 99px;
  color: var(--ink);
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 99px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn--small {
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
}

.btn:hover {
  background: var(--pink);
  border-color: var(--pink);
  transform: translateY(-2px);
}

/* ---------- Stickers ---------- */

.sticker {
  display: inline-block;
  padding: 9px 18px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 99px;
  box-shadow: 3px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.sticker--pink {
  background: var(--pink);
}

.sticker--green {
  background: var(--green);
}

.sticker--yellow {
  background: var(--yellow);
}

.sticker--orange {
  background: var(--orange);
}

.sticker--white {
  background: var(--white);
}

/* Bulle façon message */
.sticker--bubble {
  background: var(--white);
  border-radius: 20px 20px 20px 4px;
}

.stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
}

/* Chaque sticker est posé légèrement de travers, et se redresse au survol */
.stickers .sticker:nth-child(3n + 1) {
  transform: rotate(-2.5deg);
}

.stickers .sticker:nth-child(3n + 2) {
  transform: rotate(1.8deg);
}

.stickers .sticker:nth-child(3n) {
  transform: rotate(-1deg);
}

.stickers .sticker:hover {
  transform: rotate(0) scale(1.07);
}

.stickers--big .sticker {
  padding: 13px 26px;
  font-size: clamp(18px, 2.3vw, 26px);
}

.stickers--soft {
  margin-top: 34px;
  justify-content: center;
}

/* ---------- Accueil ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  max-width: none;
  min-height: 100svh;
  padding: calc(var(--nav) + 56px) max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) 72px;
}

.hero__hello {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  color: var(--ink-soft);
}

h1 {
  margin: 0 0 18px -0.04em;
  font-size: clamp(52px, 8.8vw, 132px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero__tagline {
  max-width: 24ch;
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero__tagline strong {
  padding: 0 0.25em;
  background: var(--pink);
  border-radius: 10px;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero__facts {
  display: grid;
  gap: 8px;
  margin-top: 30px;
  font-size: 17px;
}

.hero__facts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.hero__facts span {
  min-width: 96px;
  padding: 2px 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.hero__skip,
.term__skip {
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__skip {
  margin-top: 26px;
  padding: 0;
}

.hero__skip:hover {
  color: var(--pink);
}

/* Écriture progressive : tant que l'animation n'est pas finie,
   seuls les éléments déjà "tapés" (.is-on) sont visibles */
.js .hero__text:not(.is-typed) [data-step]:not(.is-on) {
  visibility: hidden;
}

.caret {
  display: inline-block;
  width: 0.09em;
  min-width: 3px;
  height: 0.9em;
  margin-left: 0.06em;
  vertical-align: baseline;
  background: var(--pink);
  animation: blink 0.9s steps(1) infinite;
}

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
}

.blob {
  position: absolute;
  inset: 12% -8% 6% -8%;
  background: var(--pink-soft);
  border: 2px solid var(--ink);
  border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%;
  animation: wobble 9s ease-in-out infinite;
}

.hero__photo {
  position: relative;
  width: 100%;
  filter: drop-shadow(0 14px 18px rgba(0, 16, 61, 0.22));
  transform: rotate(2deg);
  transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.hero__visual:hover .hero__photo {
  transform: rotate(-1deg) scale(1.02);
}

.hero__visual .sticker {
  position: absolute;
  font-size: 15px;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}

.sticker--a {
  top: 6%;
  right: -14%;
  rotate: 8deg;
}

.sticker--b {
  bottom: 22%;
  left: -12%;
  rotate: -10deg;
  animation-delay: -1.5s !important;
}

.sticker--c {
  top: 30%;
  left: -20%;
  rotate: -4deg;
  animation-delay: -3s !important;
}

.sticker--d {
  bottom: 4%;
  right: -10%;
  rotate: 5deg;
  animation-delay: -2.2s !important;
}

/* ---------- Sections ---------- */

.section,
.band {
  padding: clamp(64px, 9vw, 120px) 0;
}

.band--green {
  background: var(--ink);
  color: var(--pink-soft);
}

.band--pink {
  background: var(--pink-soft);
}

.band--cream {
  background: var(--cream);
}

.head {
  margin-bottom: clamp(24px, 4vw, 44px);
}

.head h2 {
  margin-left: -0.04em;
  font-size: clamp(44px, 9vw, 128px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.head p {
  max-width: 46ch;
  margin-top: 14px;
  font-size: clamp(18px, 2vw, 22px);
}

.subhead {
  margin: clamp(40px, 6vw, 64px) 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Photos d'Islem ---------- */

.photo {
  position: relative;
  margin-bottom: clamp(56px, 8vw, 84px);
}

.photo img {
  width: 100%;
  height: clamp(200px, 27vw, 330px);
  object-fit: cover;
  /* --focus : la zone de la photo à garder visible (là où se trouve Islem) */
  object-position: var(--focus, 50%) 50%;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 8px 0 var(--ink);
}

/* Photo affichée en entier, sans recadrage (dézoom).
   Sur petit écran, une hauteur minimale évite un bandeau trop fin. */
.photo--full img {
  height: auto;
  aspect-ratio: 2000 / 481;
  min-height: 200px;
}

/* La citation est posée sur la photo comme une bulle de message */
.quote {
  position: absolute;
  left: clamp(12px, 3vw, 36px);
  bottom: -34px;
  max-width: min(560px, calc(100% - 24px));
  padding: 16px 22px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 22px 22px 22px 4px;
  box-shadow: 4px 5px 0 var(--ink);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 500;
  line-height: 1.4;
  transform: rotate(-1.2deg);
}

/* ---------- Cartes ---------- */

.cards3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cards2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.skill,
.xp {
  padding: 26px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 6px 0 var(--ink);
  transition: transform 0.25s, box-shadow 0.25s;
}

.skill:hover,
.xp:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 9px 0 var(--ink);
}

.skill {
  border-top-width: 14px;
  border-top-color: var(--green);
  box-shadow: 5px 6px 0 var(--ink);
}

.skill--pink {
  border-top-color: var(--pink);
}

.skill--yellow {
  border-top-color: var(--yellow);
}

.skill h3,
.xp h4 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.skill li,
.xp li {
  position: relative;
  padding: 5px 0 5px 22px;
}

.skill li::before,
.xp li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.82em;
  width: 9px;
  height: 9px;
  background: var(--pink);
  border-radius: 50%;
}

.xp__year {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
}

.xp h4 {
  margin-bottom: 2px;
}

.xp__org {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-weight: 500;
}

.xp--pink {
  background: var(--pink-soft);
}

.craft {
  margin-top: 40px;
  padding: 26px;
  background: var(--white);
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
}

.craft h3 {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 700;
}

/* ---------- Formations ---------- */

.steps {
  position: relative;
  max-width: 860px;
  padding-left: 40px;
}

.steps::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  background: var(--ink);
  border-radius: 4px;
}

.step {
  position: relative;
  padding-bottom: 36px;
}

.step::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 4px;
  width: 22px;
  height: 22px;
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
}

.step:hover::before,
.step--now::before {
  background: var(--pink);
  transform: scale(1.15);
}

.step__date {
  display: inline-block;
  padding: 2px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
}

.step--now .step__date {
  background: var(--green);
}

.step h3 {
  margin: 8px 0 2px;
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.step__org {
  color: #cf3d86;
  font-weight: 600;
}

.step p:last-child {
  margin-top: 6px;
  color: var(--ink-soft);
}

/* ---------- Console ---------- */

.term {
  background: #000a29;
  border: 2px solid var(--pink);
  border-radius: var(--radius);
  box-shadow: 6px 8px 0 var(--pink);
  color: #f4f1ea;
  font-family: var(--mono);
  font-size: 15px;
  overflow: hidden;
}

/* Dans une section claire, la console garde un contour bleu nuit */
.section .term {
  border-color: var(--ink);
  box-shadow: 6px 8px 0 var(--ink);
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #a8b1cc;
  font-size: 13px;
}

.term__dots {
  display: flex;
  gap: 7px;
}

.term__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pink);
}

.term__dots i:nth-child(2) {
  background: var(--yellow);
}

.term__dots i:nth-child(3) {
  background: var(--green);
}

.term__skip {
  margin-left: auto;
  padding: 0;
  color: var(--yellow);
  font-family: var(--sans);
}

.term__body {
  height: clamp(320px, 50vh, 520px);
  padding: 20px 22px 8px;
  overflow-y: auto;
  scrollbar-color: #2a3a6b transparent;
}

.term__body p {
  margin-bottom: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term__body b {
  color: var(--pink);
  font-weight: 500;
}

.term__body .in {
  color: #a8b1cc;
}

.term__body .in::before {
  content: "> ";
  color: var(--green);
}

/* Commande "profil" : texte d'un côté, photo de l'autre */
.term__profil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 8px;
}

.term__profil-text {
  flex: 1 1 220px;
  min-width: 0;
}

.term__profil img {
  flex: none;
  height: clamp(200px, 36vh, 340px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  transform: rotate(2deg);
}

.term__body .big {
  color: var(--yellow);
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
}

.term__body .ask {
  margin-top: 12px;
  color: var(--yellow);
}

.term__body [data-cmd] {
  padding: 1px 9px;
  border: 1px solid var(--pink);
  border-radius: 99px;
  cursor: pointer;
}

.term__body [data-cmd]:hover {
  background: var(--pink);
  color: var(--ink);
}

.term__body a {
  color: var(--yellow);
}

/* Vidéo affichée dans la console */
.term__media {
  width: min(100%, 720px);
  margin: 6px 0 14px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.term__media iframe,
.term__media video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.term__form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.term__form label {
  color: var(--green);
  font-weight: 700;
}

.term__form input {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  background: none;
  border: 0;
  outline: 0;
  color: #f4f1ea;
  caret-color: var(--pink);
  font: inherit;
  font-size: 16px;
}

.term__form input::placeholder {
  color: #5a668f;
}

.term__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 22px 20px;
}

.term__chips button {
  padding: 7px 15px;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  color: #f4f1ea;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.term__chips button:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--ink);
  transform: translateY(-2px);
}

.term__chips .is-main {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}

/* Confettis pour la commande "embaucher" */
.confetti {
  position: fixed;
  top: -20px;
  z-index: 95;
  width: 12px;
  height: 12px;
  pointer-events: none;
  animation: fall linear forwards;
}

/* ---------- Pied de page ---------- */

.footer {
  padding: clamp(48px, 7vw, 88px) var(--gutter) 40px;
  background: var(--ink);
  color: var(--pink-soft);
  font-size: 15px;
  text-align: center;
}

.footer__big {
  margin-bottom: 18px;
  font-size: clamp(44px, 10vw, 140px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

/* ---------- Apparition au scroll ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  translate: none;
}

/* ---------- Animations ---------- */

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes float {
  50% {
    translate: 0 -8px;
  }
}

@keyframes wobble {
  50% {
    border-radius: 55% 45% 56% 44% / 46% 56% 44% 54%;
  }
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(600deg);
    opacity: 0.2;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .nav__burger {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 12px;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 24px;
    box-shadow: 0 5px 0 var(--ink);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 12px 16px;
    font-size: 17px;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav) + 40px);
  }

  h1 {
    font-size: clamp(52px, 15vw, 110px);
  }

  .hero__visual {
    width: min(64%, 300px);
    margin-top: 12px;
  }

  .sticker--a {
    right: -26%;
  }

  .sticker--c {
    left: -30%;
  }

  .sticker--d {
    right: -24%;
  }

  .sticker--b {
    left: -24%;
  }

  .cards3,
  .cards2 {
    grid-template-columns: 1fr;
  }

  .quote {
    position: relative;
    left: 0;
    bottom: 0;
    max-width: none;
    margin: -22px 10px 0;
  }

  .photo {
    margin-bottom: 36px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .nav .btn--small {
    display: none;
  }

  .hero__visual .sticker {
    font-size: 12px;
    padding: 6px 12px;
  }

  .term {
    font-size: 14px;
  }

  .term__title {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
  }
}

[data-run].is-active {
  background: #ff6fb0;
  color: #fff;
}
