:root {
  color-scheme: light dark;
  --bg: rgb(15, 23, 41);
  --card: #1e293b;
  --card-light: #f8fafc;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --border: rgba(148, 163, 184, 0.3);
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  margin: 0;
  background: linear-gradient(135deg, #020617 0%, #0f172a 70%);
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  min-height: 100vh;
  padding: 6.5rem clamp(1.5rem, 5vw, 6rem) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 2rem));
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 100;
}

.brand {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle,
.nav-toggle-label {
  display: none;
}

.hero-content {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  color: #f8fafc;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #0f172a;
}

.btn.primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
}

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

main {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 0 clamp(1.5rem, 5vw, 6rem) 4rem;
}

.section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow);
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.about-grid,
.skills-grid,
.projects-grid,
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.about-grid article,
.skills-grid article,
.projects-grid article,
.spotlight-grid article {
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.card-link {
  display: block;
  color: inherit;
}

.card-link article {
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.card-link:hover article,
.card-link:focus-visible article {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

.about-grid article h3,
.skills-grid article h3,
.projects-grid article h3,
.spotlight-grid article h3 {
  margin-bottom: 0.5rem;
}

ul {
  padding-left: 1.2rem;
  margin: 0;
}

.timeline-list {
  display: grid;
  gap: 1.5rem;
}

.timeline-list article {
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), transparent);
}

.timeline-date {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.projects-grid .link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-list article {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.experience-list article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.experience-list h3 {
  font-size: 1.2rem;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

input,
textarea {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

.footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .navbar {
    width: calc(100% - 1.5rem);
    border-radius: 24px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle-label {
    display: flex;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    background: var(--text);
    width: 20px;
    height: 2px;
    border-radius: 2px;
    position: relative;
  }

  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    position: absolute;
    width: 20px;
    left: 0;
  }

  .nav-toggle-label span::before {
    top: -6px;
  }

  .nav-toggle-label span::after {
    top: 6px;
  }

  .nav-links {
    position: absolute;
    top: 90%;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(2, 6, 23, 0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 5.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .section {
    padding: 1.75rem;
  }
}

/* ===== POPUP MOT DE PASSE — NOIR & OR ===== */

.password-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.password-modal.active {
  display: flex;
}

.modal-content {
  background: #0b0b0b;
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  border: 1px solid #c9a24d;
  box-shadow: 0 0 25px rgba(201, 162, 77, 0.25);
  animation: pop 0.25s ease;
}

@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h3 {
  color: #c9a24d;
  margin-bottom: 0.5rem;
}

.modal-content p {
  color: #e5e5e5;
}

.modal-content input {
  width: 100%;
  padding: 0.7rem;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid #c9a24d;
  background: #000;
  color: #fff;
}

.modal-content input::placeholder {
  color: #888;
}

.error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.success {
  color: #2ecc71;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeSuccess 0.6s ease forwards;
}

@keyframes fadeSuccess {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BOUTONS ===== */

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modal-actions button {
  flex: 1;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-actions button:hover {
  transform: translateY(-1px);
}

/* VALIDER = VERT + GLOW */
#confirmBtn {
  background: #2ecc71;
  color: #000;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.6),
              0 0 25px rgba(46, 204, 113, 0.4);
}

#confirmBtn:hover {
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.9),
              0 0 35px rgba(46, 204, 113, 0.7);
}

/* ANNULER = ROUGE */
#cancelBtn {
  background: #e74c3c;
  color: #fff;
}

/* ===== MODE CLAIR AUTO ===== */

@media (prefers-color-scheme: light) {
  .password-modal {
    background: rgba(255, 255, 255, 0.7);
  }

  .modal-content {
    background: #ffffff;
  }

  .modal-content p {
    color: #333;
  }

  .modal-content input {
    background: #f5f5f5;
    color: #000;
  }
}





.project-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}



.hero-image img {
  width: 250px;
  height: auto;
  border-radius: 15%; 
  object-fit: cover;
}

.hero-container {
  display: flex;
  align-items: center;
  /*justify-content: space-between;*/
  gap: 40px;
  flex-wrap: nowrap;
}

.hero-content {
  max-width: 600px;
  flex: 1; /* prend tout l’espace dispo */
  min-width: 0; /* évite les bugs de débordement */
}










.tooltip {
  position: relative;
  cursor: pointer;
  color: rgb(255, 255, 255);
  text-decoration: underline;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;

  position: absolute;
  left: 110%;       /* place la bulle à droite */
  top: 50%;
  transform: translateY(-50%);

  background: rgb(24, 36, 65);
  border: 1px solid #ffffff;
  padding: 10px;
  width: 200px;
  border-radius: 8px;
  box-shadow: 0px 5px 10px rgba(0,0,0,0.2);

  transition: opacity 0.3s;
  z-index: 1;
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

.tooltip-content img {
  margin-top: 5px;
  max-width: 100%;
}


.tooltip-content::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);

  border-width: 6px;
  border-style: solid;
  border-color: transparent white transparent transparent;
}



.project-veille {
  width: 200px;
  height: 70px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}