/* ============================================================
   main.css — Portfolio Tangui Ropars
   ============================================================ */

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

html {
  overflow-x: clip;
}
body {
  overflow-x: clip;
  width: 100%;
}

/* ── Palette ── */
:root {
  --bg: #0f0d1a;
  --surface: #17132a;
  --card: #1e1735;
  --card-hover: #251d40;
  --border: #3d3068;
  --border-glow: #7c5cbf;
  --accent: #b47fe0;
  --accent2: #8a4fd4;
  --accent3: #6b35b0;
  --text: #e8d5ff;
  --text-muted: #9b85c0;
  --white: #ffffff;
  --danger: #f87272;
  --success: #4ade80;
  --warning: #f0a500;
  --muted: #8b7aa8;
}

/* ══════════════════════════════════════════════════════════
   GLOBAL
══════════════════════════════════════════════════════════ */

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: "Raleway", sans-serif;
  scroll-behavior: smooth;
  position: relative;
}

h2 {
  margin-top: 5%;
  text-align: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-family: "Noto Serif HK", serif;
  font-size: clamp(28px, 4vw, 40px);
  transition: 0.25s;
}
h2:hover {
  color: var(--white);
  transform: scale(1.04);
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS AU SCROLL (reveal)
══════════════════════════════════════════════════════════ */

.reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 1.3s cubic-bezier(0.16, 0.8, 0.3, 1),
    transform 1.3s cubic-bezier(0.16, 0.8, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════
   FOND — quadrillage
══════════════════════════════════════════════════════════ */

.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(180, 127, 224, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 127, 224, 0.18) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: grid-drift 36s linear infinite;
  mask-image: radial-gradient(
    ellipse 90% 80% at 50% 25%,
    black 35%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 90% 80% at 50% 25%,
    black 35%,
    transparent 100%
  );
}

@keyframes grid-drift {
  0% {
    background-position:
      0 0,
      0 0;
  }
  100% {
    background-position:
      56px 56px,
      56px 56px;
  }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
}

.bg-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #8a4fd4, transparent 70%);
  top: -150px;
  left: -150px;
  animation: orb-float-1 20s ease-in-out infinite;
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #b47fe0, transparent 70%);
  bottom: 10%;
  right: -100px;
  animation: orb-float-2 24s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(70px, 60px) scale(1.08);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes orb-float-2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-60px, -60px) scale(1.1);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   HEADER — sticky
══════════════════════════════════════════════════════════ */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(23, 19, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  padding: 16px 40px;
  gap: 20px;
  animation: header-drop 1.1s cubic-bezier(0.16, 0.8, 0.3, 1) both;
}

@keyframes header-drop {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 20px);
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

nav ul {
  display: flex;
  gap: clamp(12px, 2.5vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: 0.2s;
}
nav a:hover {
  color: var(--white);
  text-shadow: 0 0 8px rgba(180, 127, 224, 0.7);
}

nav a {
  position: relative;
}
nav a.active {
  color: var(--white);
  text-shadow: 0 0 10px rgba(180, 127, 224, 0.85);
}
nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: 0.3s;
}

/* ══════════════════════════════════════════════════════════
   ACCUEIL
══════════════════════════════════════════════════════════ */

.accueil {
  border: 1px solid var(--border);
  margin: 40px auto;
  border-radius: 24px;
  max-width: 820px;
  background: rgba(30, 23, 53, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px;
  box-shadow:
    0 0 60px rgba(138, 79, 212, 0.15),
    inset 0 1px 0 rgba(180, 127, 224, 0.1);
  animation: fade-in-up 1.4s 0.2s cubic-bezier(0.16, 0.8, 0.3, 1) both;
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes avatar-pulse {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(138, 79, 212, 0.35);
  }
  50% {
    box-shadow: 0 0 45px rgba(138, 79, 212, 0.6);
  }
}

.logo {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  column-gap: 36px;
}

.logo img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent2);
  box-shadow: 0 0 30px rgba(138, 79, 212, 0.35);
  grid-row: 1 / 3;
  animation: avatar-pulse 6s ease-in-out infinite;
}

.logo h2 {
  margin: 0 0 10px;
  text-align: left;
  font-size: clamp(24px, 3.5vw, 38px);
  font-family: "Noto Serif HK", serif;
  color: var(--white);
  padding: 0;
}
.logo h2:hover {
  transform: none;
}

.logo p {
  margin: 0;
  color: var(--white);
  font-size: 15px;
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   SOCIAL LINKS
══════════════════════════════════════════════════════════ */

.sociallinks {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px auto;
  max-width: 820px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  transition: 0.25s;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
}
.social-btn i {
  font-size: 18px;
}

.github {
  background: rgba(36, 23, 58, 0.8);
  border-color: #5a3f8a;
}
.linkedin {
  background: rgba(26, 42, 64, 0.8);
  border-color: #3a6090;
}
.email {
  background: rgba(42, 31, 58, 0.8);
  border-color: #7c4ab0;
}
.CV {
  background: rgba(31, 42, 32, 0.8);
  border-color: #3a7a45;
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}

/* ══════════════════════════════════════════════════════════
   PROFIL / IDENTITE
══════════════════════════════════════════════════════════ */

.identite {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 40px;
  padding: 0 40px;
}

.identite-card {
  background: rgba(30, 23, 53, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  transition: 0.3s;
}

.identite-card i {
  font-size: 26px;
  color: var(--accent2);
  margin-bottom: 12px;
  display: block;
}

.identite-card h3 {
  margin: 0 0 8px;
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  font-size: 15px;
}

.identite-card p {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
}

.identite-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
  box-shadow: 0 12px 35px rgba(138, 79, 212, 0.25);
  background: rgba(37, 29, 64, 0.85);
}
.identite-card:hover i,
.identite-card:hover h3 {
  color: var(--white);
  text-shadow: 0 0 12px rgba(180, 127, 224, 0.6);
}

/* ══════════════════════════════════════════════════════════
   SKILLS
══════════════════════════════════════════════════════════ */

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  padding: 20px 60px 50px;
  color: var(--text);
  font-size: 14px;
}

.skills h3 {
  margin: 0 0 18px;
  text-align: center;
  color: var(--accent);
  font-family: "Noto Serif HK", serif;
  font-size: 18px;
}

.skills ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.frontend,
.backend,
.autres,
.scripts {
  background: rgba(30, 23, 53, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: 0.3s;
}

.frontend ul li,
.backend ul li,
.autres ul li,
.scripts ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: var(--white);
  font-size: 15px;
}

.frontend:hover,
.backend:hover,
.autres:hover,
.scripts:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
  box-shadow: 0 12px 35px rgba(138, 79, 212, 0.25);
  background: rgba(37, 29, 64, 0.85);
}
.frontend:hover h3,
.backend:hover h3,
.autres:hover h3,
.scripts:hover h3 {
  color: var(--white);
  text-shadow: 0 0 12px rgba(180, 127, 224, 0.6);
}

/* ══════════════════════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════════════════════ */

.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 20px 60px 50px;
}

.project-card {
  background: rgba(30, 23, 53, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 340px;
  overflow: hidden;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(138, 79, 212, 0.3);
  border-color: var(--accent2);
}

.project-card-img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  display: block;
}
.project-card-img-placeholder {
  width: 100%;
  height: 185px;
  background: linear-gradient(135deg, var(--surface), var(--card-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--border);
}

.project-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-card-body h3 {
  margin: 0 0 10px;
  font-family: "Noto Serif HK", serif;
  font-size: 20px;
  color: var(--accent);
  transition: 0.2s;
}
.project-card:hover h3 {
  color: var(--white);
  text-shadow: 0 0 10px rgba(180, 127, 224, 0.5);
}
.project-card-body p {
  color: var(--white);
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
  margin: 0 0 18px;
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 18px;
}
.project-tag {
  background: rgba(138, 79, 212, 0.15);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 4px 12px;
  border-radius: 20px;
  transition: 0.2s;
}
.project-card:hover .project-tag {
  border-color: var(--accent2);
  color: var(--white);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  color: var(--white);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: 0.25s;
  align-self: flex-start;
}
.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 79, 212, 0.4);
}

/* ══════════════════════════════════════════════════════════
   TIMELINE
══════════════════════════════════════════════════════════ */

.timeline {
  position: relative;
  max-width: 100%;
  margin: auto;
}
.container {
  padding: 10px 50px;
  position: relative;
  width: 50%;
}

.text-box {
  padding: 20px 30px;
  position: relative;
  border-radius: 20px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  color: var(--white);
  box-shadow: 0 8px 25px rgba(138, 79, 212, 0.3);
}
.left-container {
  left: 0;
}
.right-container {
  left: 50%;
}
.container img {
  position: absolute;
  width: 110px;
  height: auto;
  border-radius: 10px;
  top: 20px;
  z-index: 10;
  object-fit: cover;
  border: 2px solid var(--border);
}
.left-container img {
  right: -55px;
}
.right-container img {
  left: -55px;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent2), var(--accent3));
  top: 0;
  left: 50%;
  margin-left: -2px;
  z-index: -1;
  animation: moveline 1.5s linear forwards;
  border-radius: 4px;
}
@keyframes moveline {
  0% {
    height: 0;
  }
  100% {
    height: 100%;
  }
}
.text-box h3 {
  font-weight: 700;
  margin: 0 0 4px;
}
.text-box small {
  display: inline-block;
  margin-bottom: 12px;
  opacity: 0.8;
  font-size: 13px;
}
.left-container-arrow,
.right-container-arrow {
  width: 0;
  height: 0;
  position: absolute;
  top: 28px;
  z-index: 1;
}
.left-container-arrow {
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 14px solid var(--accent3);
  right: -14px;
}
.right-container-arrow {
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-right: 14px solid var(--accent3);
  left: -14px;
}

/* ══════════════════════════════════════════════════════════
   BTS SIO + VEILLE
══════════════════════════════════════════════════════════ */

.btssio,
.veille {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8%;
  flex-wrap: wrap;
  padding: 0 40px;
}
.btssio h3,
.veille h3 {
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  margin: 0 0 12px;
}
.btssio p,
.veille p {
  color: var(--white);
  line-height: 1.6;
}

.cquoi,
.gestion,
.sujet,
.explication {
  text-align: center;
  background: rgba(30, 23, 53, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: 0.3s;
  flex: 1;
  min-width: 240px;
  max-width: 480px;
  padding: 28px;
}
.cquoi:hover,
.gestion:hover,
.sujet:hover,
.explication:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
  box-shadow: 0 12px 35px rgba(138, 79, 212, 0.25);
  background: rgba(37, 29, 64, 0.85);
}
.cquoi:hover h3,
.gestion:hover h3,
.sujet:hover h3,
.explication:hover h3 {
  color: var(--white);
  text-shadow: 0 0 12px rgba(180, 127, 224, 0.6);
}

/* ══════════════════════════════════════════════════════════
   VEILLE RSS
══════════════════════════════════════════════════════════ */

.veille-rss {
  width: 100%;
  margin-top: 32px;
  background: rgba(30, 23, 53, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: 0.3s;
}

.veille-rss h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  margin: 0 0 20px;
  font-size: 18px;
}

.veille-rss h3 i {
  color: #f07028;
}

.veille-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.veille-article {
  background: rgba(23, 19, 42, 0.6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  transition: 0.25s;
}

.veille-article:hover {
  border-left-color: var(--accent);
  background: rgba(37, 29, 64, 0.8);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(138, 79, 212, 0.2);
}

.veille-article a {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  transition: 0.2s;
}
.veille-article:hover a {
  color: var(--accent);
}

.veille-article p {
  margin: 0;
  font-size: 13px;
  color: var(--white);
  line-height: 1.55;
}

.veille-date {
  font-size: 11px;
  color: var(--border-glow);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.veille-erreur {
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   COMPETENCES PROFESSIONNELLES (référentiel)
══════════════════════════════════════════════════════════ */

.competences-pro-intro {
  max-width: 720px;
  margin: -10px auto 30px;
  padding: 0 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.competences-pro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 40px;
}

.bloc-competences {
  background: rgba(30, 23, 53, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  transition: 0.3s;
}
.bloc-competences:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
  box-shadow: 0 12px 35px rgba(138, 79, 212, 0.25);
  background: rgba(37, 29, 64, 0.85);
}

.bloc-competences h3 {
  margin: 0 0 4px;
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.3;
  transition: 0.2s;
}
.bloc-competences:hover h3 {
  color: var(--white);
  text-shadow: 0 0 12px rgba(180, 127, 224, 0.6);
}

.bloc-competences small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 16px;
}

.bloc-competences ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.competence-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  transition: 0.2s;
}

.competence-item i {
  margin-top: 2px;
  font-size: 15px;
  flex-shrink: 0;
}

.competence-item.acquis {
  color: var(--white);
}
.competence-item.acquis i {
  color: var(--success);
}

.competence-item.non-acquis i {
  color: var(--muted);
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════════════
   EN COURS DE DEV
══════════════════════════════════════════════════════════ */

.truc h2 {
  color: var(--warning);
}
.dev {
  border: 3px solid var(--warning);
  border-radius: 12px;
  background: repeating-linear-gradient(
    45deg,
    #0f0d1a,
    #0f0d1a 10px,
    rgba(240, 165, 0, 0.12) 10px,
    rgba(240, 165, 0, 0.12) 20px
  );
  padding: 20px;
  width: 100%;
  margin-bottom: 8%;
  margin-top: 8%;
}

/* ══════════════════════════════════════════════════════════
   FOOTER + FORMULAIRE
══════════════════════════════════════════════════════════ */

footer {
  background: rgba(23, 19, 42, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 70px 20px 40px;
  border-top: 1px solid var(--border);
  color: var(--white);
  text-align: center;
  margin-top: 8%;
  border-radius: 24px 24px 0 0;
}
footer h2 {
  color: var(--accent);
  margin-bottom: 30px;
}

.form {
  max-width: 860px;
  margin: auto;
}
.form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}
.form label {
  grid-column: span 2;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: -10px;
}
.form input,
.form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(30, 23, 53, 0.8);
  color: var(--white);
  font-size: 15px;
  font-family: "Raleway", sans-serif;
  transition: 0.25s;
}
.form textarea {
  grid-column: span 2;
  min-height: 130px;
  resize: vertical;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(180, 127, 224, 0.35);
}
.form input[type="submit"] {
  grid-column: span 2;
  justify-self: center;
  width: auto;
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.25s;
}
.form input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(138, 79, 212, 0.45);
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.turnstile-wrapper {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .skills {
    padding: 20px 24px 40px;
  }
  .projects {
    padding: 20px 24px 40px;
  }
  .btssio,
  .veille {
    padding: 0 20px;
  }
  .competences-pro,
  .competences-pro-intro {
    padding: 0 20px;
  }
  .identite {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 12px 16px;
    border-radius: 0;
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
  }
  h1 {
    font-size: 14px;
  }
  .burger {
    display: flex;
  }
  nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(23, 19, 42, 0.99);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 999;
  }
  nav.open {
    display: block;
  }
  nav ul {
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
  }
  nav a {
    font-size: 17px;
    display: block;
    padding: 4px 0;
  }

  .accueil {
    margin: 16px;
    padding: 20px 16px;
    max-width: 100%;
    width: auto;
  }
  .logo {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }
  .logo img {
    width: 140px;
    height: 140px;
    grid-row: auto;
    grid-column: auto;
  }
  .logo h2 {
    text-align: center;
    padding: 0;
    font-size: 26px;
  }
  .logo p {
    padding: 0;
    text-align: center;
  }

  .sociallinks {
    gap: 10px;
    padding: 0 16px;
  }
  .social-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .identite {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 16px;
    gap: 14px;
  }

  .skills {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .projects {
    padding: 16px;
    gap: 20px;
  }
  .project-card {
    width: 100%;
  }

  .timeline {
    margin: 30px auto;
  }
  .timeline::after {
    left: 20px;
  }
  .container {
    width: 100%;
    padding-left: 60px;
    padding-right: 16px;
  }
  .right-container {
    left: 0;
  }
  .left-container img,
  .right-container img {
    position: relative;
    left: 0;
    right: 0;
    top: 0;
    width: 55px;
    margin-bottom: 10px;
    float: left;
    margin-right: 10px;
  }
  .left-container-arrow,
  .right-container-arrow {
    border-left: 0;
    border-right: 14px solid var(--accent3);
    left: -14px;
  }

  .btssio,
  .veille {
    flex-direction: column;
    margin-top: 5%;
    padding: 0 16px;
  }
  .cquoi,
  .gestion,
  .sujet,
  .explication {
    max-width: 100%;
  }
  .veille-rss {
    padding: 20px 16px;
  }
  .competences-pro,
  .competences-pro-intro {
    padding: 0 16px;
  }

  footer {
    padding: 40px 16px 30px;
    border-radius: 0;
  }
  .form form {
    grid-template-columns: 1fr;
  }
  .form label,
  .form textarea,
  .form input[type="submit"] {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 26px;
  }
  .social-btn span {
    display: none;
  }
  .social-btn {
    padding: 12px;
    border-radius: 50%;
  }
  .identite {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   ADMIN — LOGIN
══════════════════════════════════════════════════════════ */

.admin-login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 45px 40px;
  width: 380px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.login-card h1 {
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  text-align: center;
  margin: 0 0 30px;
  font-size: 24px;
}
.login-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text);
}
.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--white);
  font-size: 15px;
  margin-bottom: 18px;
  transition: 0.2s;
  font-family: "Raleway", sans-serif;
}
.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(180, 127, 224, 0.3);
}
.login-card button[type="submit"] {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  border: none;
  border-radius: 12px;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  font-family: "Raleway", sans-serif;
}
.login-card button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 79, 212, 0.4);
}
.login-error {
  background: rgba(248, 114, 114, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.timeout-msg {
  color: var(--warning);
  text-align: center;
  margin-bottom: 15px;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   ADMIN — PANEL
══════════════════════════════════════════════════════════ */

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 30px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  font-family: "Noto Serif HK", serif;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  padding: 0 20px 25px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 15px;
}
.sidebar-logo span {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  transition: 0.2s;
  font-weight: 600;
  font-size: 14px;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(180, 127, 224, 0.08);
}
.nav-item.active {
  color: var(--accent);
  background: rgba(180, 127, 224, 0.14);
  border-left: 3px solid var(--accent);
}
.badge {
  background: var(--danger);
  color: white;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 11px;
  margin-left: auto;
}
.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.logout-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  font-size: 13px;
  transition: 0.2s;
  text-align: center;
  text-decoration: none;
}
.logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.main-content {
  padding: 35px 40px;
  overflow-y: auto;
  color: var(--text);
  font-family: "Raleway", sans-serif;
}
.page-title {
  font-family: "Noto Serif HK", serif;
  font-size: 26px;
  color: var(--accent);
  margin: 0 0 25px;
}
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}
.alert-error {
  background: rgba(248, 114, 114, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px;
  border-bottom: 1px solid rgba(61, 48, 104, 0.4);
  vertical-align: middle;
  color: var(--text);
  font-size: 14px;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: rgba(180, 127, 224, 0.04);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid.col3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group.full {
  grid-column: 1 / -1;
}
.admin-layout label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.admin-layout input[type="text"],
.admin-layout input[type="url"],
.admin-layout input[type="number"],
.admin-layout input[type="password"],
.admin-layout select,
.admin-layout textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--white);
  font-size: 14px;
  font-family: "Raleway", sans-serif;
  transition: 0.2s;
  width: 100%;
}
.admin-layout input:focus,
.admin-layout select:focus,
.admin-layout textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(180, 127, 224, 0.25);
}
.admin-layout textarea {
  min-height: 80px;
  resize: vertical;
}
.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(138, 79, 212, 0.35);
}
.btn-danger {
  background: rgba(248, 114, 114, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(248, 114, 114, 0.22);
}
.btn-success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid var(--success);
  color: var(--success);
}
.btn-success:hover {
  background: rgba(74, 222, 128, 0.22);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.tag-frontend {
  background: rgba(99, 179, 237, 0.15);
  color: #63b3ed;
}
.tag-backend {
  background: rgba(154, 230, 180, 0.15);
  color: #68d391;
}
.tag-autre {
  background: rgba(246, 173, 85, 0.15);
  color: #f6ad55;
}
.tag-scripts {
  background: rgba(216, 180, 254, 0.15);
  color: #d8b4fe;
}
.tag-unread {
  background: rgba(248, 114, 114, 0.15);
  color: var(--danger);
}
.tag-read {
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
}
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.modal-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: "Raleway", sans-serif;
}
.msg-preview {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
  }
  .main-content {
    padding: 20px;
  }
  .form-grid,
  .form-grid.col3 {
    grid-template-columns: 1fr;
  }
}
