/* ===== RESET & VARIABLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a1a1a;
  --color-text-muted: #555555;
  --color-accent: #1d4ed8;
  --color-border: #e2e2e2;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --spacing-section: 5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

/* ===== HEADER & NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}

.logo-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - 65px); /* le visiteur arrive sur le hero seul */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  scroll-margin-top: 65px; /* évite que le clic sur le logo masque la photo */
}

.hero-content {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
}

.hero-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  object-fit: cover;
}

.availability {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-intro {
  margin: -1rem auto 2rem;
  color: var(--color-text-muted);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid var(--color-accent);
}

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

.btn-primary:hover {
  background: #1640b0;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
}

/* ===== SECTION LAYOUT (partagé par toutes les sections de contenu) ===== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-section) 1.5rem;
  scroll-margin-top: 65px; /* hauteur de l'en-tête collant */
}

.section-alt {
  background: var(--color-bg-alt);
  max-width: none;
}

.section-alt > * {
  max-width: calc(var(--max-width) - 3rem);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ===== COMPETENCES ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-category h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 0.3rem 0;
  color: var(--color-text-muted);
}

/* ===== PARCOURS ===== */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.5rem;
}

.timeline-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.timeline + .timeline-title {
  margin-top: 3rem;
}

.timeline-item h4 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.timeline-item p {
  color: var(--color-text-muted);
}

/* ===== PROJETS ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.projects-group {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.projects-title {
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--color-accent);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
}

.projects-note {
  padding: 1rem 1.25rem;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
  color: var(--color-text-muted);
}

.project-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  overflow-wrap: break-word;
}

.project-card h4 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.project-card[open] summary {
  margin-bottom: 1rem;
}

.project-card p {
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.project-card p:last-child {
  margin-bottom: 0;
}

.project-card .project-list-title {
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--color-text);
}

.project-list {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.project-list li {
  margin-bottom: 0.3rem;
}

.project-list li::marker {
  color: var(--color-accent);
}

.project-list:last-child {
  margin-bottom: 0;
}

/* ===== CONTACT ===== */
.contact-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

/* ===== ACCORDEON (Parcours + Projets) ===== */
.timeline-item summary,
.project-card summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

.timeline-item summary::-webkit-details-marker,
.project-card summary::-webkit-details-marker {
  display: none;
}

.item-teaser {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.timeline-item summary::after,
.project-card summary::after {
  content: '+';
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.timeline-item details[open] summary::after,
.project-card[open] summary::after {
  transform: rotate(45deg);
}

.timeline-item details p {
  margin-top: 0.75rem;
}

.project-shots {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  align-items: start;
  gap: 1.5rem 1rem;
  margin: 1.25rem 0;
}

.project-shots:last-child {
  margin-bottom: 0;
}

.project-shots > * {
  min-width: 0;
}

.project-shots > :only-child {
  grid-column: 1 / -1;
}

.project-shots a {
  display: block;
}

.project-shots img {
  height: auto; /* les attributs width/height réservent la place sans déformer */
  margin: 0 auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.project-shots figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open {
    max-height: 300px;
  }

  .nav-links li {
    padding: 0.75rem 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .project-card {
    padding: 1.25rem;
  }
}

/* ===== SÉPARATEUR POINT FLOTTANT (remplace les tirets cadratins) ===== */
.dot-sep {
  display: inline-block;
  color: var(--color-accent);
  animation: dot-float 2.6s ease-in-out infinite;
}

@keyframes dot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.18em); }
}

@media (prefers-reduced-motion: reduce) {
  .dot-sep {
    animation: none;
  }
}
