/* --- VARIABLES & THEME --- */
:root {
    --bg-dark: #0a0e17; /* Fond très sombre, presque noir */
    --surface: #131b2c; /* Surface des cartes */
    --primary: #3b82f6; /* Bleu électrique */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #8b5cf6; /* Violet pour les dégradés */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --font: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- BACKGROUND FX --- */
.background-glows {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1;
    overflow: hidden; pointer-events: none;
}
.glow-blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: float 10s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary); }
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: var(--accent); animation-delay: -5s; }
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: #06b6d4; opacity: 0.2; }

@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1200px;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }

.nav-menu { display: flex; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: 0.3s; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--text-main); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px;
    background: var(--primary); box-shadow: 0 0 10px var(--primary);
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white; padding: 0.6rem 1.2rem; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-glow); }

/* --- HERO --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; padding: 120px 5% 0;
    justify-content: center; text-align: center;
}
.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981; padding: 6px 12px; border-radius: 30px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.5rem;
}
.status-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; box-shadow: 0 0 10px #10b981; }

h1 { font-size: 4.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1rem; letter-spacing: -2px; }
.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.role { font-size: 1.5rem; color: var(--text-main); font-weight: 500; margin-bottom: 1rem; }
.description { max-width: 600px; margin: 0 auto 3rem; color: var(--text-muted); font-size: 1.1rem; }

.hero-stats {
    display: flex; justify-content: center; gap: 3rem; margin-bottom: 3rem;
}
.stat-box { text-align: center; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.hero-actions { display: flex; justify-content: center; gap: 1.5rem; }
.btn {
    padding: 1rem 2rem; border-radius: 12px; text-decoration: none; font-weight: 600;
    display: flex; align-items: center; gap: 10px; transition: 0.3s;
}
.primary { background: var(--text-main); color: var(--bg-dark); }
.primary:hover { background: #e2e8f0; transform: translateY(-3px); }
.secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--border); }
.secondary:hover { background: rgba(255,255,255,0.1); }

/* --- GLASS CARD STYLE (REUSABLE) --- */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.glass:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* --- SECTIONS GENERAL --- */
.section { padding: 6rem 5%; }
.container { max-width: 1100px; margin: 0 auto; }
.section-header { margin-bottom: 4rem; text-align: center; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); }

/* --- ABOUT --- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.icon-large { font-size: 2rem; color: var(--primary); margin-bottom: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.tags span {
    background: rgba(255,255,255,0.05); padding: 5px 12px; border-radius: 20px;
    font-size: 0.85rem; color: var(--text-muted); border: 1px solid var(--border);
}

/* --- TIMELINE --- */
.timeline { position: relative; border-left: 2px solid rgba(255,255,255,0.1); margin-left: 20px; padding-left: 40px; }
.timeline-item { margin-bottom: 3rem; position: relative; }
.timeline-marker {
    position: absolute; left: -49px; top: 0; width: 16px; height: 16px;
    background: var(--bg-dark); border: 2px solid var(--primary); border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}
.timeline-content .date { color: var(--primary); font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.5rem; }
.timeline-content ul { margin-left: 1.2rem; margin-top: 1rem; color: var(--text-muted); }

/* --- SKILLS --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.skill-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.skill-header i { font-size: 1.5rem; color: var(--primary); }
.skill-bar { margin-bottom: 1rem; }
.skill-bar p { font-size: 0.9rem; margin-bottom: 5px; display: flex; justify-content: space-between; }
.bar-bg { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; }

/* --- LIBRARY --- */
.library-controls { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.filter-chip {
    background: transparent; border: 1px solid var(--border); color: var(--text-muted);
    padding: 8px 20px; border-radius: 30px; cursor: pointer; transition: 0.3s;
}
.filter-chip.active, .filter-chip:hover { background: var(--primary); color: white; border-color: var(--primary); }

.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.doc-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.2rem; cursor: pointer;
}
.doc-icon {
    width: 50px; height: 50px; background: rgba(59, 130, 246, 0.1); color: var(--primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.doc-icon.linux { color: #f97316; background: rgba(249, 115, 22, 0.1); }
.doc-info h4 { font-size: 1rem; margin-bottom: 2px; }
.doc-info span { font-size: 0.8rem; color: var(--text-muted); }
.doc-btn { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; }

/* --- FOOTER --- */
footer { text-align: center; padding: 4rem 2rem; border-top: 1px solid var(--border); background: #05080f; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin: 2rem 0; }
.social-btn {
    width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--text-main);
    text-decoration: none; transition: 0.3s;
}
.social-btn:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }

/* --- MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-window { width: 90%; max-width: 600px; padding: 0; overflow: hidden; transform: scale(0.9); transition: 0.3s; }
.modal-overlay.active .modal-window { transform: scale(1); }
.modal-head { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.close-icon { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 2rem; text-align: center; }
.pdf-placeholder { background: rgba(255,255,255,0.05); padding: 3rem; border-radius: 12px; margin-top: 1rem; border: 1px dashed var(--border); }
.pdf-placeholder i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.modal-foot { padding: 1.5rem; border-top: 1px solid var(--border); }
.full-width { width: 100%; text-align: center; justify-content: center; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar { width: 100%; top: 0; border-radius: 0; border-top: 0; padding: 1rem; }
    .nav-menu { display: none; } /* Mobile menu simplified for demo */
    h1 { font-size: 3rem; }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    .timeline { margin-left: 0; padding-left: 20px; }
}

/* Animation Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- CONTACT FORM --- */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.form-group input, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: var(--font);
    transition: 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 6px;
    transition: 0.3s;
}

.form-status.success { color: #10b981; padding: 10px; background: rgba(16, 185, 129, 0.1); }
.form-status.error { color: #ef4444; padding: 10px; background: rgba(239, 68, 68, 0.1); }

#submitBtn.loading {
    opacity: 0.7;
    pointer-events: none;
}
.button {
  --black-700: hsla(0 0% 12% / 1);
  --border_radius: 9999px;
  --transtion: 0.3s ease-in-out;
  --offset: 2px;

  cursor: pointer;
  position: relative;

  display: flex;
  align-items: center;
  gap: 0.5rem;

  transform-origin: center;

  padding: 1rem 2rem;
  background-color: transparent;

  border: none;
  border-radius: var(--border_radius);
  transform: scale(calc(1 + (var(--active, 0) * 0.1)));

  transition: transform var(--transtion);
      text-decoration: none;

}

.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  height: 100%;
  background-color: var(--black-700);

  border-radius: var(--border_radius);
  box-shadow: inset 0 0.5px hsl(0, 0%, 100%), inset 0 -1px 2px 0 hsl(0, 0%, 0%),
    0px 4px 10px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
    0 0 0 calc(var(--active, 0) * 0.375rem) hsl(260 97% 50% / 0.75);

  transition: all var(--transtion);
  z-index: 0;
}

.button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  height: 100%;
  background-color: hsla(260 97% 61% / 0.75);
  background-image: radial-gradient(
      at 51% 89%,
      hsla(266, 45%, 74%, 1) 0px,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, hsla(266, 36%, 60%, 1) 0px, transparent 50%),
    radial-gradient(at 22% 91%, hsla(266, 36%, 60%, 1) 0px, transparent 50%);
  background-position: top;

  opacity: var(--active, 0);
  border-radius: var(--border_radius);
  transition: opacity var(--transtion);
  z-index: 2;
}

.button:is(:hover, :focus-visible) {
  --active: 1;
}
.button:active {
  transform: scale(1);
}

.button .dots_border {
  --size_border: calc(100% + 2px);

  overflow: hidden;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: var(--size_border);
  height: var(--size_border);
  background-color: transparent;

  border-radius: var(--border_radius);
  z-index: -10;
}

.button .dots_border::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: left;
  transform: rotate(0deg);

  width: 100%;
  height: 2rem;
  background-color: white;

  mask: linear-gradient(transparent 0%, white 120%);
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.button .sparkle {
  position: relative;
  z-index: 10;

  width: 1.75rem;
}

.button .sparkle .path {
  fill: currentColor;
  stroke: currentColor;

  transform-origin: center;

  color: hsl(0, 0%, 100%);
}

.button:is(:hover, :focus) .sparkle .path {
  animation: path 1.5s linear 0.5s infinite;
}

.button .sparkle .path:nth-child(1) {
  --scale_path_1: 1.2;
}
.button .sparkle .path:nth-child(2) {
  --scale_path_2: 1.2;
}
.button .sparkle .path:nth-child(3) {
  --scale_path_3: 1.2;
}

@keyframes path {
  0%,
  34%,
  71%,
  100% {
    transform: scale(1);
  }
  17% {
    transform: scale(var(--scale_path_1, 1));
  }
  49% {
    transform: scale(var(--scale_path_2, 1));
  }
  83% {
    transform: scale(var(--scale_path_3, 1));
  }
}

.button .text_button {
  position: relative;
  z-index: 10;

  background-image: linear-gradient(
    90deg,
    hsla(0 0% 100% / 1) 0%,
    hsla(0 0% 100% / var(--active, 0)) 250%
  );
  background-clip: text;

  font-size: 1rem;
  color: white;
}

.cv {
  display: flex;
  justify-content: center; /* centre horizontalement */
  margin-top: 10px;        /* espace depuis le haut */
}

.card {
  width: 750px;
  height: 485px;
  margin: 0 auto;
  background-color: #24233b;
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0px 10px 10px rgb(73, 70, 92);
  transition: 0.5s;
}

.card:hover {
  transform: translateY(-7px);
  box-shadow: 0px 10px 10px black;
}

.top {
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.circle {
  padding: 0 4px;
}

.circle2 {
  display: inline-block;
  align-items: center;
  width: 10px;
  height: 10px;
  padding: 1px;
  border-radius: 5px;
}

.red {
  background-color: #ff605c;
}

.yellow {
  background-color: #ffbd44;
}

.green {
  background-color: #00ca4e;
}

.header {
  margin: 5px;
  margin-top: 5px;
  border-radius: 5px;
}

#title2 {
  color: white;
  padding-left: 50px;
  font-size: 15px;
}

.code-container {
  text-align: center;
}
#code {
  width: 710px;
  height: 350px;
  resize: none;
  background-color: rgb(73, 70, 92);
  border-radius: 5px;
  border: none;
  color: white;
  padding: 10px;
}
#code:focus {
  outline: none !important;
}

#epreuves {
}
.cards-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

/* --- RESPONSIVE CARDS --- */
@media (max-width: 1024px) {
  .card {
    width: 90%;
    height: auto;
  }

  #code {
    width: 100%;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .cards-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 95%;
  }

  #code {
    height: 250px;
  }

  #title2 {
    padding-left: 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .card {
    width: 100%;
  }

  #code {
    height: 220px;
    font-size: 12px;
  }

  #title2 {
    font-size: 12px;
  }
}

/* From Uiverse.io by Allyhere */ 
.btn-donate {
  --clr-font-main: hsla(0 0% 20% / 100);
  --btn-bg-1: rgb(103, 137, 212);
  --btn-bg-2: hsla(217 100% 56% / 1);
  --btn-bg-color: hsla(360 100% 100% / 1);
  --radii: 0.5em;
  gap: 20px;

  cursor: pointer;
  padding: 0.55em 1em;
  min-width: unset;
  min-height: unset;
  font-size: 0.85rem;     
  font-weight: 300;
  transition: 0.8s;
  background-size: 200% auto;
  background-image: linear-gradient(
    325deg,
    var(--btn-bg-2) 0%,
    var(--btn-bg-1) 55%,
    var(--btn-bg-2) 90%
  );
  border: none;
  border-radius: var(--radii);
  color: var(--btn-bg-color);
  box-shadow:
    0px 0px 20px rgba(71, 184, 255, 0.5),
    0px 5px 5px -1px rgba(58, 125, 233, 0.25),
    inset 4px 4px 8px rgba(175, 230, 255, 0.5),
    inset -4px -4px 8px rgba(19, 95, 216, 0.35);
}

.btn-donate:hover {
  background-position: right top;
}

.btn-donate:is(:focus, :focus-visible, :active) {
  outline: none;
  box-shadow:
    0 0 0 3px var(--btn-bg-color),
    0 0 0 6px var(--btn-bg-2);
}

@media (prefers-reduced-motion: reduce) {
  .btn-donate {
    transition: linear;
  }
}

.card-buttons {
    display: flex;
    justify-content: center; 
    gap: 30px;             
    margin-top: 15px;
}
.card-buttons a {
    text-decoration: none;

}

.card-buttons a:hover {
    text-decoration: none;
}

.num {
  color: #e2e8f0;
  text-decoration: none;
}