:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card-bg: #111827;
  --primary: #8b5cf6;    /* violet lumineux */
  --primary2: #38bdf8;   /* bleu clair */
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius: 10px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --max-width: 1050px;
  --transition: 0.2s ease;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Curseur personnalisé type néon (contour noir, triangle dégradé) */
* {
  cursor: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'>\
  <defs>\
    <linearGradient id='g' x1='0' y1='0' x2='1' y2='1'>\
      <stop offset='0%' stop-color='%23ff00ff'/>\
      <stop offset='50%' stop-color='%2300ffff'/>\
      <stop offset='100%' stop-color='%23a3ff00'/>\
    </linearGradient>\
  </defs>\
  <path d='M4 3 L30 16 L19 19 L16 30 Z' fill='%23000000' stroke='%23000000' stroke-width='1.4' stroke-linejoin='round'/>\
  <path d='M6 5 L26 15 L18 18 L15 27 Z' fill='url(%23g)' stroke='%23ffffff' stroke-width='0.8' stroke-linejoin='round'/>\
</svg>") 2 2, auto;
}

/* On garde pointer seulement pour <a> et <button>, pas pour les champs de formulaire */
a,
button {
  cursor: pointer;
}

input,
textarea {
  cursor: text;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #0f172a 0, #020617 55%, #000 100%);
  color: var(--text);
  font-family: var(--font-main);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

a {
  color: var(--primary2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.35), transparent);
  border-bottom: 1px solid rgba(15, 23, 42, 0.85);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  font-size: 0.95rem;
}

.logo span {
  color: var(--primary2);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  position: relative;
  padding-bottom: 0.15rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, var(--primary), var(--primary2));
  transition: width var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

/* Sections */

.section {
  padding: 4rem 0;
}

.section.alt {
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 55%),
    var(--bg-alt);
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

.section-intro {
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 42rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Hero */

.hero {
  padding: 5rem 0 4rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: 2.8rem;
  align-items: center;
}

/* Photo */

.hero-photo-wrapper {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.photo-bg-glow {
  position: absolute;
  left: 0;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 25% 20%, rgba(139, 92, 246, 0.75), transparent 60%),
    radial-gradient(circle at 75% 80%, rgba(56, 189, 248, 0.7), transparent 60%);
  filter: blur(10px);
  opacity: 0.95;
}

.photo-frame {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  padding: 6px;
  background: radial-gradient(circle at 20% 20%, #0f172a, #020617);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(139, 92, 246, 0.5),
    0 0 70px rgba(56, 189, 248, 0.55);
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 3px solid rgba(15, 23, 42, 0.95);
}

/* Texte hero */

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tagline {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary2);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.1vw, 2.8rem);
  margin: 0 0 1rem;
}

.hero-text {
  color: var(--muted);
  max-width: 38rem;
  line-height: 1.6;
}

.hero-text.small {
  font-size: 0.92rem;
  margin-top: -0.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  will-change: transform, box-shadow;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #0b1020;
  box-shadow: 0 15px 30px rgba(56, 189, 248, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.45);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border-color: rgba(55, 65, 81, 0.9);
}

.btn.secondary:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--primary2);
}

.btn.outline {
  background: transparent;
  color: var(--primary2);
  border-color: rgba(56, 189, 248, 0.7);
}

.btn.outline:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--primary2);
  color: var(--text);
}

/* Compétences */

.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 1.8rem;
  align-items: flex-start;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.card {
  background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.18), transparent 65%),
              var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: var(--shadow-soft);
}

.skill-card {
  padding: 1.1rem 1.1rem;
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.02rem;
}

.skill-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.skill-card li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.skill-card .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
}

/* Skills côté droit */

.skills-side {
  padding: 1.1rem 1.1rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  border-radius: var(--radius);
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: var(--shadow-soft);
}

.skills-side h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1.02rem;
}

.skills-side ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.skills-side li {
  margin-bottom: 0.45rem;
}

.skills-side .tag {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  color: var(--primary2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 0.4rem;
}

.skills-side .muted {
  color: var(--muted);
}

/* Projets */

.project {
  border-radius: var(--radius);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.98));
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.1rem;
}

.project h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.project-meta {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: var(--primary2);
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.project p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-details {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.project-with-image {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr);
  gap: 1.2rem;
  align-items: center;
}

/* Glow derrière les images */
.project-image {
  position: relative;
}

.project-image::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.45), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.45), transparent 60%);
  filter: blur(12px);
  opacity: 0.9;
  z-index: 0;
}

.project-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  object-fit: cover;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(139, 92, 246, 0.4),
    0 0 40px rgba(56, 189, 248, 0.4);
}

/* Parcours (Timeline) */

.timeline {
  position: relative;
  margin-top: 1rem;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.3rem;
  padding: 1rem 0 1.2rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-date-block {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--primary2);
  white-space: nowrap;
}

.timeline-year {
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
  background: rgba(15, 23, 42, 0.95);
}

.timeline-separator {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.timeline-location {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.timeline-details {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-details li {
  margin-bottom: 0.25rem;
}

/* À propos */

.about-text {
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Alertes */

.alert {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin: 0.8rem 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.alert::before {
  content: "●";
  font-size: 0.8rem;
}

.alert-success {
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.7);
  color: #bbf7d0;
}

.alert-success::before {
  color: #22c55e;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

.alert-error::before {
  color: #ef4444;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.95rem;
}

.contact-list li {
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.contact-note {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact-form {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 14px;
  border: 1px solid rgba(31, 41, 55, 0.95);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.form-group {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

input,
textarea {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.97));
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary2);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(2, 6, 23, 0.98));
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  padding: 1.2rem 0 1.4rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.1), transparent 55%), #020617;
}

.footer-content {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Responsive global */

@media (max-width: 920px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-photo-wrapper {
    justify-content: center;
  }

  .photo-bg-glow {
    left: auto;
  }

  .project-with-image {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero {
    padding-top: 4rem;
  }

  .skills-layout {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-date-block {
    margin-bottom: 0.25rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================= */
/* Recommandations (cartes)  */
/* ========================= */

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.recommendation-card {
  padding: 1.2rem 1.3rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.15), transparent 55%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 55%),
    #020617;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.8);

  /* AJOUTS POUR ALIGNER LES BOUTONS EN BAS */
  display: flex;
  flex-direction: column;
}


.recommendation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.recommendation-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: #e5e7eb;
}

.recommendation-prof {
  margin: 0;
  font-size: 0.8rem;
  color: #e5e7eb;
  line-height: 1.4;
}

.recommendation-mail {
  font-size: 0.78rem;
  color: var(--primary2);
}

.recommendation-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.85);
  color: var(--primary2);
  white-space: nowrap;
}

.recommendation-meta {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  color: #e5e7eb;
}

.recommendation-meta li {
  margin-bottom: 0.2rem;
}



.recommendation-text {
  font-size: 0.9rem;
  color: #e5e7eb;
  line-height: 1.5;
  margin: 0 0 0.9rem;

  /* Permet au texte de prendre la place dispo, pour pousser les boutons en bas */
  flex: 1;
}

.recommendation-actions-bottom {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Variante de bouton plus petit pour les recommandations */
.btn.small {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

/* ========================= */
/* Fenêtre modale (reco)     */
/* ========================= */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
}

/* Carte blanche, écriture noire dans la modale */
.modal-dialog {
  position: relative;
  max-width: 620px;
  width: 92%;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  padding: 1.3rem 1.4rem 1.1rem;
  overflow: hidden;
  color: #000000;
}


.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.1rem;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
  color: var(--primary2);
  transform: scale(1.05);
}

#reco-modal-title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: #000000;
}

.modal-subtitle {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #000000;
}

/* Texte de la lettre : noir par défaut (les parties en rouge restent gérées inline) */
.modal-body {
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 0.3rem;
  font-size: 0.9rem;
  color: #000000;
  line-height: 1.6;
}

/* Scrollbar plus neutre (fond clair, thumb bleu) */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.4);
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.8);
  border-radius: 999px;
}

/* Responsive modale + cartes */
@media (max-width: 720px) {
  .recommendation-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .recommendation-actions-bottom {
    justify-content: flex-start;
  }
}


.signature-image {
  max-width: 180px;  /* adapte si tu veux plus grand/petit */
  display: block;
  margin: 0 auto;    /* centre l’image dans la modale */
}







/* --- Galerie ultra-compacte --- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem; /* encore plus réduit */
}

.gallery-card {
  background: var(--card-bg);
  border-radius: 8px; /* plus petit */
  border: 1px solid rgba(255, 255, 255, 0.04); /* bordure très fine */
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow-soft);
}

/* zone photo réduite */
.gallery-fixed {
  width: 100%;
  height: 400px; /* réduit encore (avant 520px) */
  max-height: 400px;
  overflow: hidden;
  border-radius: 8px; /* cohérent avec la carte */
}

/* image verticale */
.gallery-fixed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}

/* zoom discret */
.gallery-fixed img:hover {
  transform: scale(1.03);
}


/* --- Effet lumière sur les bordures --- */

.gallery-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: var(--card-bg);
  
  /* Lumière douce autour */
  box-shadow:
    0 0 10px rgba(0, 128, 255, 0.5),
    0 0 20px rgba(255, 0, 0, 0.3),
    0 0 40px rgba(255, 0, 0, 0.15);
}

/* Lumière encore plus belle au survol */
.gallery-card:hover {
  box-shadow:
    0 0 6px rgba(0, 195, 255, 0.7),
    0 0 14px rgba(0, 195, 255, 0.55),
    0 0 26px rgba(0, 195, 255, 0.35);
  transition: box-shadow 0.3s ease;
}
