/*
 * Habillage du portfolio (index, creations, mon-garage, auto-entreprise).
 * Chargé APRÈS le <style> de chaque page et APRÈS /blog/theme.css (couleurs, formes, mouvement).
 * Ce fichier ne contient que les règles propres au portfolio.
 */
/* Thème : automatique (réglage du système) ou choisi avec le bouton jour/nuit, comme sur le blog */
html { scroll-padding-top: 96px; }
body { font-family: var(--font); line-height: 1.7; }
h1, h2, h3 { font-family: var(--font); }

/* ── Navigation ── */
nav {
  background: color-mix(in srgb, var(--md-surface) 82%, transparent);
  border-bottom: 0;
}
nav.scrolled { box-shadow: 0 1px 0 var(--md-outline-var); }
nav .logo { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.05em; }
nav .logo span { color: var(--md-primary); }
nav ul li a,
nav .back-link {
  padding: 10px 16px; border-radius: var(--shape-pill);
  font-size: .9rem; font-weight: 700; letter-spacing: .01em; text-transform: none;
  color: var(--md-on-surface-var);
  transition: background .3s, color .3s, border-radius .5s var(--spring);
}
/* Barre : logo à gauche, liens puis bouton jour/nuit à droite */
nav { justify-content: flex-start; }
nav .nav-links, nav .back-link { margin-left: auto; }
nav ul { gap: 4px; }
nav .theme-toggle { margin-left: 12px; }
@media (max-width: 900px) {
  nav .theme-toggle { order: 2; margin-left: auto; }
  .hamburger { order: 3; margin-left: 8px; }
}
nav { gap: 8px; }
@media (max-width: 480px) {
  nav .back-link { padding: 9px 13px; font-size: .8rem; }
}
nav ul li a::after { display: none; }
nav ul li a:hover,
nav .back-link:hover { background: var(--md-primary-container); color: var(--md-on-primary-container); border-radius: 14px; }
nav .back-link { background: var(--md-surface-high); color: var(--md-on-surface); }
.hamburger span { background: var(--md-on-surface); }
@media (max-width: 900px) {
  nav ul.nav-links.open {
    background: var(--md-surface-card); border: 0; border-radius: 0 0 var(--shape-lg) var(--shape-lg);
    box-shadow: var(--elev-2);
  }
}

/* ── Boutons : la forme change au survol / à l'appui ── */
.btn {
  padding: 16px 32px; border-radius: var(--shape-pill);
  font-family: var(--font); font-size: 1rem; font-weight: 700; letter-spacing: 0;
  transition: border-radius .5s var(--spring), transform .5s var(--spring), background .3s, color .3s, box-shadow .3s;
}
.btn-primary { background: var(--md-primary); color: var(--md-on-primary); }
.btn-primary:hover { background: var(--md-primary); border-radius: 20px; transform: translateY(-3px); box-shadow: var(--elev-2); }
.btn-secondary { background: var(--md-primary-container); color: var(--md-on-primary-container); border: 0; }
.btn-secondary:hover { color: var(--md-on-primary-container); border-radius: 20px; transform: translateY(-3px); }
.btn:active { transform: scale(.95); border-radius: 12px; }

/* ── Grands bandeaux violets : héros, en-têtes de pages, contact, appels à l'action ── */
.hero, .page-hero, .contact-section, .cta-section {
  position: relative; isolation: isolate; overflow: hidden;
  width: calc(100% - 32px); max-width: 1200px;
  background: var(--md-purple); color: var(--md-on-purple);
  border-radius: clamp(32px, 5vw, 64px);
}
.hero::before, .page-hero::before, .contact-section::before, .cta-section::before,
.page-hero::after, .cta-section::after {
  content: ''; position: absolute; z-index: -1;
}
.hero::before, .page-hero::before { width: 380px; height: 380px; right: -110px; top: -130px; border-radius: 50%; background: var(--md-indigo); opacity: .8; }
.page-hero::after { width: 120px; height: 120px; left: 6%; bottom: -40px; border-radius: 30% 70% 60% 40% / 40% 40% 60% 60%; background: var(--md-yellow); }
.contact-section::before, .cta-section::before { width: 340px; height: 340px; left: -110px; bottom: -150px; border-radius: 50%; background: var(--md-secondary); opacity: .8; }
.cta-section::after { width: 110px; height: 110px; right: 8%; top: -36px; border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; background: var(--md-yellow); }

.hero h1, .page-hero h1 {
  font-weight: 900; letter-spacing: -0.05em; line-height: 1.03; color: var(--md-on-purple);
}
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--md-yellow); }
.hero p, .page-hero p, .page-hero > p, .cta-section p, .contact-section p { color: var(--md-on-purple-muted); }
.hero .btn-primary, .cta-section .btn-primary, .contact-section .btn-primary { background: var(--md-yellow); color: var(--md-on-yellow); }
.hero .btn-primary:hover, .cta-section .btn-primary:hover { background: var(--md-yellow); }
.hero .btn-secondary { background: rgba(255, 255, 255, .14); color: var(--md-on-purple); }
.hero-tag, .page-hero .badge {
  background: var(--md-yellow); color: var(--md-on-yellow);
  padding: 6px 18px; border: 0; border-radius: var(--shape-pill);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em;
}
.hero-tag::before { display: none; }

/* Héros de la page d'accueil */
.hero {
  min-height: 0; margin: 88px auto 0;
  padding: clamp(32px, 6vw, 80px); gap: clamp(24px, 4vw, 56px);
}
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
.hero-photo .photo-wrapper::before { border-color: rgba(255, 255, 255, .3); border-radius: 160px 48px 160px 48px; }
.hero-photo .photo-wrapper::after { width: 76px; height: 76px; bottom: -22px; right: -22px; background: var(--md-yellow); }
.hero-photo img { border-radius: 160px 48px 160px 48px; filter: none; }
@media (max-width: 900px) {
  .hero { padding: 40px 24px; margin-top: 88px; }
  .hero-photo img, .hero-photo .photo-wrapper::before { border-radius: 110px 36px 110px 36px; }
}

/* En-têtes des pages intérieures */
.page-hero {
  margin: 88px auto 0; padding: clamp(40px, 7vw, 88px) clamp(24px, 5vw, 72px);
  text-align: center;
}
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
.page-hero .tech-stack span { background: rgba(255, 255, 255, .12); color: var(--md-on-purple); border: 0; font-weight: 600; }

/* ── Sections ── */
section { padding: clamp(56px, 8vw, 100px) clamp(20px, 4vw, 48px); }
.section-label {
  display: inline-block; padding: 6px 16px; border-radius: var(--shape-pill);
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
}
.section-title { font-weight: 900; letter-spacing: -0.045em; line-height: 1.05; font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.section-divider { width: 72px; height: 8px; border-radius: 8px; background: var(--md-yellow); margin-top: 24px; }

/* ── Cartes : tonales, très arrondies, la forme se transforme au survol ── */
.detail-item, .project-card, .skill-group, .gallery-item, .feature-card, .roadmap-item,
.highlight-card, .service-card, .value-item {
  border: 0; border-radius: var(--shape-xl); background: var(--md-surface-card); box-shadow: var(--elev-1);
  transition: transform .5s var(--spring), border-radius .5s var(--spring), box-shadow .4s, background .3s;
}
.project-card:hover, .gallery-item:hover, .feature-card:hover, .service-card:hover, .skill-group:hover,
.detail-item:hover, .highlight-card:hover, .value-item:hover {
  transform: translateY(-5px); border-radius: 56px 20px 56px 20px; box-shadow: var(--elev-2);
}

/* À propos : quatre blocs de couleurs */
.about-text p strong { color: var(--md-primary); font-weight: 700; }
.detail-item { border-radius: var(--shape-lg); }
.detail-item:nth-child(1) { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.detail-item:nth-child(2) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.detail-item:nth-child(3) { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.detail-item:nth-child(4) { background: var(--md-surface-high); color: var(--md-on-surface); }
.detail-item .label { color: inherit; opacity: .8; font-weight: 700; }
.detail-item .value { font-weight: 700; }

/* Projets */
.project-name { font-weight: 800; letter-spacing: -0.03em; font-size: 1.9rem; }
.project-type { color: var(--md-secondary); font-weight: 700; letter-spacing: .08em; }
.project-tags span { background: var(--md-secondary-container); color: var(--md-on-secondary-container); font-weight: 600; }
.project-link { color: var(--md-primary); font-weight: 700; }
.project-link:hover { color: var(--md-primary); }

/* Compétences : trois familles de couleurs */
.skill-group h3 { font-weight: 800; letter-spacing: -0.02em; }
.skill-group:nth-child(1) { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.skill-group:nth-child(2) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.skill-group:nth-child(3) { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.skill-group-icon { background: light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .14)); border-radius: 16px; }
.skill-item { color: inherit; font-weight: 500; }
.skill-dot { width: 8px; height: 8px; background: currentColor; opacity: .6; }

/* Parcours */
.timeline::before { left: 6px; width: 4px; border-radius: 4px; background: var(--md-outline-var); }
.timeline-item::before { left: -38px; top: 6px; width: 16px; height: 16px; background: var(--md-primary); border: 4px solid var(--md-yellow); }
.timeline-date { color: var(--md-primary); font-weight: 700; }
.timeline-title { font-weight: 800; letter-spacing: -0.02em; }

/* Contact et appels à l'action */
.contact-section, .cta-section {
  margin: 40px auto 24px; padding: clamp(48px, 8vw, 96px) 24px; text-align: center;
}
.contact-section .section-label, .cta-section .section-label { background: var(--md-yellow); color: var(--md-on-yellow); }
.contact-section .section-title, .cta-section .section-title { color: var(--md-on-purple); }
.contact-link {
  border: 0; background: rgba(255, 255, 255, .12); color: var(--md-on-purple);
  border-radius: var(--shape-pill); font-weight: 700;
  transition: border-radius .5s var(--spring), transform .5s var(--spring), background .3s, color .3s;
}
.contact-link:hover { background: var(--md-yellow); color: var(--md-on-yellow); border-color: transparent; border-radius: 20px; box-shadow: none; }
.contact-link svg { color: currentColor; }
footer { border-top: 0; color: var(--md-on-surface-var); }
footer a { color: inherit; text-underline-offset: 3px; }
footer a:hover { color: var(--md-primary); }

/* ── Pages intérieures ── */
.filter-btn {
  border: 0; border-radius: var(--shape-pill); background: var(--md-surface-high); color: var(--md-on-surface);
  font-family: var(--font); font-weight: 600;
  transition: border-radius .5s var(--spring), background .3s, color .3s, transform .5s var(--spring);
}
.filter-btn:hover { background: var(--md-primary-container); color: var(--md-on-primary-container); border-radius: 14px; }
.filter-btn.active { background: var(--md-primary); color: var(--md-on-primary); }
.gallery-item .info h3, .feature-card h3, .roadmap-content h3, .service-card h3, .value-content h3 { font-weight: 800; letter-spacing: -0.02em; }
.item-tags span { font-weight: 700; }
/* Fond clair fixe derrière les visuels : logos et visuels sont conçus pour un fond clair, même en mode sombre */
.gallery-item .visual { background: #F1ECFB; }
.tag-logo { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.tag-video { background: light-dark(#E9D8FF, #4A2A8C); color: light-dark(#3B1580, #E9D8FF); }
.tag-visual { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.tag-event { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.tag-cm { background: light-dark(#DCE3FF, #24338C); color: light-dark(#1B2A78, #DCE3FF); }
.tag-pao { background: var(--md-surface-highest); color: var(--md-on-surface); }

.feature-icon { display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.6rem; margin-bottom: 18px; }
.feature-icon, .service-icon { background: var(--md-primary-container); color: var(--md-on-primary-container); border-radius: 18px; }
.feature-card:nth-child(3n+2) .feature-icon, .service-card:nth-child(3n+2) .service-icon { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.feature-card:nth-child(3n) .feature-icon, .service-card:nth-child(3n) .service-icon { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.status-done { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.status-progress { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.status-planned { background: var(--md-surface-high); color: var(--md-on-surface-var); }

.highlight-card:nth-child(1) { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.highlight-card:nth-child(2) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.highlight-card:nth-child(3) { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.highlight-card .number { font-weight: 900; letter-spacing: -0.04em; color: inherit; }
.highlight-card .hl-label { color: inherit; opacity: .8; font-weight: 600; }
.story-text p strong { color: var(--md-primary); font-weight: 700; }
.value-number { color: var(--md-primary); font-weight: 900; }
.value-item { background: var(--md-surface-low); box-shadow: none; }

/* Petits écrans : les formes décoratives restent dans les coins et ne passent plus derrière le texte */
@media (max-width: 640px) {
  .page-hero::after { left: auto; right: -26px; bottom: -46px; width: 80px; height: 80px; }
  .cta-section::after { width: 80px; height: 80px; right: -20px; top: -32px; }
  .contact-section::before, .cta-section::before { width: 220px; height: 220px; left: -100px; bottom: -130px; }
  .hero::before { width: 260px; height: 260px; right: -100px; top: -100px; }
  .hero-photo .photo-wrapper::after { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
