/* ================================================================
   HILTICE — projet.css v3
   Styles partagés : pages projet (détail) + page contact.
   S'appuie sur les tokens de style.css (Design System v3).
   ================================================================ */

/* ── Lien retour ──────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  padding: var(--sp-sm) 0;
  margin-bottom: var(--sp-lg);
  transition: color var(--t-fast);
}
.back-link:hover { color: var(--fg); }
.back-link svg { transition: transform var(--t-fast); }
.back-link:hover svg { transform: translateX(-4px); }

/* ── HERO PROJET ──────────────────────────────────────────────── */
.project-hero {
  padding-top: calc(72px + var(--sp-xl));
  padding-bottom: var(--sp-xl);
}
.project-hero-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
  max-width: 920px;
}
.project-title-page {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.project-subtitle {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 640px;
}
/* Fiche projet — présentation en tableau (4 colonnes desktop, 2 mobile) */
.project-meta-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project-meta-cell {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3xs);
  padding: var(--sp-md) var(--sp-lg) var(--sp-md) 0;
  border-left: 1px solid var(--border);
  padding-left: var(--sp-lg);
}
.project-meta-cell:first-child { border-left: none; padding-left: 0; }
.project-meta-cell-label {
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.project-meta-cell-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .project-meta-table { grid-template-columns: repeat(2, 1fr); }
  .project-meta-cell:nth-child(2n+1) { border-left: none; padding-left: 0; }
  .project-meta-cell:nth-child(n+3) { border-top: 1px solid var(--border); padding-top: var(--sp-md); }
}

/* Image hero projet */
.project-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--sp-xl);
  border: 1px solid var(--glass-border);
  background: var(--bg-raised);
  box-shadow: var(--glass-shadow);
}
.project-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ── INFOS PROJET ─────────────────────────────────────────────── */
.project-body {
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--border);
}
.project-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--sp-2xl);
  align-items: start;
}
.project-meta {
  position: sticky;
  top: calc(72px + var(--sp-lg));
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}
.meta-label {
  font-size: var(--text-micro);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--sp-3xs);
}
.meta-value {
  font-size: var(--text-base);
  color: var(--fg);
  font-weight: 500;
  line-height: 1.5;
}
.meta-services {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-services span {
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

/* ── CONTENU TEXTE ────────────────────────────────────────────── */
.project-content { min-width: 0; }
.project-intro {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--border);
}
.project-section { margin-bottom: var(--sp-xl); }
.project-section-title {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-sm);
  color: var(--fg);
}
.project-section p {
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-sm);
}
.project-section ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}
.project-section li {
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: 1.6;
  padding-left: var(--sp-md);
  position: relative;
}
.project-section li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 1px;
  background: var(--fg-muted);
}

/* ── GALERIE ──────────────────────────────────────────────────── */
.project-gallery {
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--border);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}
.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--bg-raised);
  box-shadow: var(--glass-shadow);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ── PROJETS SUIVANTS ─────────────────────────────────────────── */
.next-projects {
  padding: var(--sp-2xl) 0;
  border-top: 1px solid var(--border);
}
.next-projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
  max-width: 560px;
}
.next-project-card {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  text-decoration: none;
  transition: transform 0.4s var(--ease-spring);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.next-project-card:hover { transform: translateY(-6px); }
.next-project-card-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}
.next-project-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--sp-lg);
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}
.next-project-card-label {
  font-size: var(--text-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  margin-bottom: var(--sp-3xs);
}
.next-project-card-name {
  font-size: var(--text-h3);
  font-weight: 700;
  color: #F2F0EA;
  letter-spacing: -0.02em;
}

/* ── FORMULAIRE CONTACT ───────────────────────────────────────── */
.contact-page {
  padding-top: calc(72px + var(--sp-2xl));
  padding-bottom: var(--sp-2xl);
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--sp-2xl);
  align-items: start;
}
.contact-title {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-lg);
}
.contact-desc {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--sp-xl);
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.contact-detail-label {
  font-size: var(--text-micro);
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.contact-detail-value {
  font-size: var(--text-base);
  color: var(--fg-muted);
  transition: color var(--t-fast);
}
.contact-detail-value:hover { color: var(--fg); }

.contact-visual {
  margin-bottom: var(--sp-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.contact-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 700 / 874;
  object-fit: cover;
  display: block;
}

/* Formulaire */
.contact-form-wrapper {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}
.form-label {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem var(--sp-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
  -webkit-appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--fg-faint); }
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(242,240,234,0.05);
}
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
  border-color: #E5484D;
}
.form-error {
  display: block;
  min-height: 1.1em;
  font-size: var(--text-xs);
  color: #FF6B6F;
  margin-top: var(--sp-3xs);
}
.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.form-select option { background: var(--bg-raised); }

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--text-base);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity var(--t-fast), transform var(--t-fast);
  font-family: var(--font);
  width: 100%;
  margin-top: var(--sp-2xs);
}
.form-submit:hover { opacity: 0.9; transform: translateY(-2px); }
.form-submit:active { transform: translateY(0); }

/* Message de succès */
.form-success {
  display: none;
  text-align: center;
  padding: var(--sp-xl);
  color: var(--fg-muted);
}
.form-success.is-visible { display: flex; flex-direction: column; gap: var(--sp-sm); align-items: center; }
.form-success-icon { font-size: 2.5rem; }

/* ── PAGES LÉGALES ────────────────────────────────────────────── */
.legal-page {
  padding-top: calc(72px + var(--sp-2xl));
  padding-bottom: var(--sp-2xl);
}
.legal-title {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-sm);
}
.legal-updated {
  font-size: var(--text-sm);
  color: var(--fg-faint);
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--border);
}
.legal-content { max-width: 720px; }
.legal-section { margin-bottom: var(--sp-xl); }
.legal-section-title {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-sm);
}
.legal-section p {
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-sm);
}
.legal-section a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.legal-todo {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.6em;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-meta { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrapper { padding: var(--sp-lg); }
}
