/* ══════════════════════════════════════════
   MODALE PROJET Inquiring v01
   S'ajoute à style.css sans le modifier.
   Même DA : glassmorphism, dégradés, sombre.
══════════════════════════════════════════ */

/* ── Bouton d'ouverture sur les cartes projet ── */
.project-card { cursor: none; }
.proj-open {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background 1.8s ease, opacity .2s;
  border: none; padding: 0;
  font-family: 'DM Sans', sans-serif;
}
.proj-open::after {
  content: '→';
  -webkit-text-fill-color: initial;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform .2s ease;
  display: inline-block;
}
.proj-open:hover::after { transform: translateX(4px); }

/* ── Overlay de fond ── */
#modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
#modal-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── Boîte modale ── */
#modal-box {
  position: relative;
  width: 100%; max-width: 860px;
  max-height: 88vh;
  background: rgba(18, 22, 32, 0.94);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  overflow: hidden; overflow-y: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  scrollbar-width: none;
}
#modal-box::-webkit-scrollbar { display: none; }
#modal-overlay.open #modal-box {
  transform: translateY(0) scale(1);
}

/* Ligne dégradée en haut */
#modal-box::before {
  content: '';
  position: sticky; top: 0; left: 0; right: 0;
  height: 2px; display: block;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  transition: background 1.8s ease;
  z-index: 10; flex-shrink: 0;
}

/* ── Bouton fermeture ── */
#modal-close {
  position: sticky; top: 12px;
  float: right;
  margin: 12px 16px 0 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--muted); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
  z-index: 20; flex-shrink: 0;
}
#modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

/* ── Contenu ── */
.modal-inner { padding: 32px 36px 48px; }

/* En-tête */
.modal-header { margin-bottom: 32px; }
.modal-eyebrow {
  font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; transition: background 1.8s ease;
  margin-bottom: 10px; display: block;
}

/* Bandeau « En cours de réalisation » affiché si proj.wip = true.
   Couleur warm orange pour signaler clairement « pas finalisé »,
   distincte du dégradé violet/bleu du thème (qui marque ce qui est posé). */
.modal-wip-banner {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 184, 77, 0.10);
  border: 1px solid rgba(255, 184, 77, 0.40);
  border-radius: 22px;
  padding: 5px 14px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #FFB84D;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal-wip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #FFB84D;
  box-shadow: 0 0 8px rgba(255,184,77,0.6);
  animation: modalWipPulse 2.4s ease-in-out infinite;
}
@keyframes modalWipPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .modal-wip-dot { animation: none; opacity: 1; }
}
.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900; text-transform: uppercase;
  color: var(--text); line-height: 0.9;
  letter-spacing: -1px; margin-bottom: 16px;
}
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.modal-tag {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.03);
}
.modal-desc {
  font-size: 14px; color: var(--muted); line-height: 1.8;
  max-width: 600px;
}

/* Bloc stats rapides */
.modal-stats {
  display: flex; gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 28px 0;
}
.modal-stat { flex: 1; padding: 18px 0; }
.modal-stat + .modal-stat {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.modal-stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; transition: background 1.8s ease;
  margin-bottom: 4px;
}
.modal-stat-label { font-size: 10px; color: var(--muted); line-height: 1.4; }

/* Visuel principal (placeholder) */
.modal-visual-main {
  width: 100%; aspect-ratio: 16/9;
  border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  margin-bottom: 28px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.modal-visual-main img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.modal-placeholder-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); text-align: center;
}
.modal-placeholder-label span {
  display: block; font-size: 28px; margin-bottom: 8px; opacity: .4;
}
/* Cadre dégradé subtil sur le placeholder */
.modal-visual-main::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  pointer-events: none;
}

/* Process en étapes */
.modal-section-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px; display: block;
}
.modal-steps {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--border); border-radius: 12px; overflow: hidden;
  margin-bottom: 28px;
}
.modal-step {
  background: rgba(255,255,255,0.03);
  padding: 20px 22px;
  display: grid; grid-template-columns: 36px 1fr;
  gap: 16px; align-items: start;
  transition: background .2s;
}
.modal-step:hover { background: rgba(255,255,255,0.055); }
.modal-step-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; transition: background 1.8s ease;
}
.modal-step-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 5px;
}
.modal-step-body {
  font-size: 12px; color: var(--muted); line-height: 1.65;
}

/* Grille de visuels secondaires */
.modal-visuals-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 28px;
}
.modal-visual-thumb {
  aspect-ratio: 4/3;
  border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.modal-visual-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-visual-thumb .modal-placeholder-label { font-size: 9px; }
.modal-visual-thumb .modal-placeholder-label span { font-size: 20px; }

/* Résultat / impact */
.modal-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 20px 22px;
  margin-bottom: 28px;
  transition: border-color 1.8s ease;
}
.modal-result-label {
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; display: block;
}
.modal-result-text { font-size: 14px; color: var(--text); line-height: 1.65; }
.modal-result-text strong {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; transition: background 1.8s ease;
}

/* Footer modale */
.modal-footer {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.modal-footer-info {
  font-size: 11px; color: var(--muted); letter-spacing: 1px;
}
.modal-nav {
  display: flex; gap: 8px;
}
.modal-nav-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-h);
  color: var(--muted); padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 500; letter-spacing: 1.5px;
  text-transform: uppercase; border-radius: 8px;
  transition: background .2s, color .2s;
}
.modal-nav-btn:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.modal-nav-btn.primary {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #0D1117; border: none; font-weight: 600;
  transition: opacity .2s, background 1.8s ease;
}
.modal-nav-btn.primary:hover { opacity: .84; }

/* ── Responsive ── */
@media (max-width: 640px) {
  #modal-overlay { padding: 12px; align-items: flex-end; }
  #modal-box { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-inner { padding: 24px 20px 40px; }
  .modal-visuals-grid { grid-template-columns: 1fr; }
  .modal-stats { flex-direction: column; }
  .modal-stat + .modal-stat { border-left: none; border-top: 1px solid var(--border); padding-left: 0; }
  .modal-footer { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════
   CTA EN TÊTE bouton « Lire l'étude UX complète » placé juste
   après le header, AVANT le scroll. Visible 1er coup d'œil pour
   un recruteur qui ouvre le modal. Utilise le dégradé du theme
   actif (--g1 → --g2) pour signaler clairement l'action prioritaire.
   ══════════════════════════════════════════════════════════════ */
.modal-cta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  background-size: 200% 200%;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  color: #0D1117;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background-position 800ms ease;
  box-shadow: 0 6px 24px -8px rgba(196,181,253,0.4);
}
.modal-cta-top:hover,
.modal-cta-top:focus-visible {
  transform: translateY(-2px);
  background-position: 100% 100%;
  box-shadow: 0 12px 32px -10px rgba(196,181,253,0.6);
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.modal-cta-top-label {
  font-size: 15px;
  text-transform: none;
  flex: 1;
}
.modal-cta-top-arrow {
  font-size: 22px;
  font-weight: 400;
  transition: transform 200ms ease;
}
.modal-cta-top:hover .modal-cta-top-arrow,
.modal-cta-top:focus-visible .modal-cta-top-arrow {
  transform: translateX(6px);
}

/* Variante désactivée : pas de page = encart info doux */
.modal-cta-top.is-disabled {
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--border-h);
  color: var(--muted);
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 22px;
  box-shadow: none;
}
.modal-cta-top.is-disabled:hover { transform: none; box-shadow: none; }
.modal-cta-top-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.2px;
}

/* ══════════════════════════════════════════════════════════════
   SCROLL-TO-TOP au lieu de dupliquer le bouton « Voir le projet »
   en bas du modal, on invite à remonter vers le CTA du haut.
   Discret, sobre, mais clair sur la prochaine action.
   ══════════════════════════════════════════════════════════════ */
.modal-scroll-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 32px 0 24px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.035);
  border: 1px dashed var(--border-h);
  border-radius: 10px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.modal-scroll-top:hover,
.modal-scroll-top:focus-visible {
  background: rgba(255,255,255,0.06);
  border-color: var(--g1);
  color: var(--text);
  outline: none;
}
.modal-scroll-top-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #0D1117;
  font-weight: 700;
  font-size: 14px;
  transition: transform 200ms ease;
}
.modal-scroll-top:hover .modal-scroll-top-arrow {
  transform: translateY(-3px);
}
.modal-scroll-top-label {
  flex: 1;
  font-weight: 500;
}

/* Mobile : CTA top + scroll-top adaptés */
@media (max-width: 600px) {
  .modal-cta-top {
    padding: 14px 18px;
    margin-bottom: 24px;
  }
  .modal-cta-top-label { font-size: 13px; }
  .modal-cta-top-arrow { font-size: 18px; }
  .modal-scroll-top {
    padding: 12px 16px;
    font-size: 11px;
  }
}
