/* ==========================================================================
   PACTUM CONSEILS - SUARL — Feuille de styles commune
   ========================================================================== */

:root {
  --navy-900: #0F2034;
  --navy-800: #18304C;
  --gold: #D4AF37;
  --gold-light: #E6C964;
  --gold-dark: #B8952A;
  --ink: #1E293B;
  --cream: #F8FAFC;
}

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(212, 175, 55, .35); color: var(--navy-900); }

/* --- Transitions de page ------------------------------------------------- */
body { animation: fadeIn .4s ease both; transition: opacity .25s ease; }
body.is-leaving { opacity: 0; }

/* --- Boutons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em; line-height: 1.2;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer; text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--navy-900);
  box-shadow: 0 12px 30px -12px rgba(212, 175, 55, .7);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(212, 175, 55, .85); }
.btn-outline-gold { border: 1.5px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline-gold:hover { background: var(--gold); color: var(--navy-900); transform: translateY(-2px); }
.btn-outline-navy { border: 1.5px solid var(--navy-900); color: var(--navy-900); background: transparent; }
.btn-outline-navy:hover { background: var(--navy-900); color: #fff; transform: translateY(-2px); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-800); transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(15, 32, 52, .7); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* --- Typographie --------------------------------------------------------- */
.font-display { font-family: "Playfair Display", Georgia, serif; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-dark);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: var(--gold); }
.on-dark .eyebrow { color: var(--gold); }
.text-gold-gradient {
  background: linear-gradient(120deg, var(--gold-light), var(--gold) 50%, #F3DE8A);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Fonds --------------------------------------------------------------- */
.bg-hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(212, 175, 55, .16), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(35, 66, 106, .9), transparent 60%),
    linear-gradient(160deg, #0F2034 0%, #18304C 100%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(212, 175, 55, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, .07) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-paper { background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }

/* --- Cartes -------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid #E2E8F0; border-radius: 1.25rem;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card-hover:hover {
  transform: translateY(-6px); border-color: rgba(212, 175, 55, .6);
  box-shadow: 0 24px 50px -20px rgba(15, 32, 52, .28);
}
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem; border-radius: 1rem;
  background: linear-gradient(145deg, #0F2034, #18304C); color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .35);
  transition: transform .35s ease;
}
.icon-tile[class*="bg-gold"] { background-image: none; }
.card-hover:hover .icon-tile { transform: rotate(-6deg) scale(1.06); }
.glass {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(212, 175, 55, .28);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* --- Navigation ---------------------------------------------------------- */
.nav-link { white-space: nowrap; position: relative; padding: .5rem 0; font-weight: 600; font-size: .93rem; color: #334155; transition: color .2s; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--gold); transition: right .3s ease;
}
.nav-link:hover { color: var(--navy-900); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }
.nav-link.is-active { color: var(--navy-900); }
#site-nav.is-scrolled { box-shadow: 0 8px 30px -16px rgba(15, 32, 52, .35); }

/* --- Apparition au défilement ------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal-delay="4"] { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  body { transition: none; }
}

/* --- Formulaires --------------------------------------------------------- */
.field-label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy-900); margin-bottom: .45rem; }
.field {
  width: 100%; border: 1.5px solid #E2E8F0; border-radius: .85rem; background: #fff;
  padding: .8rem 1rem; font-size: .95rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: #94A3B8; }
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 55, .18); }
.field.is-invalid { border-color: #DC2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.field-error { display: none; color: #B91C1C; font-size: .78rem; margin-top: .35rem; font-weight: 600; }
.field.is-invalid + .field-error, .field.is-invalid ~ .field-error { display: block; }
select.field {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F2034' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px; padding-right: 2.8rem;
}
.check { width: 1.15rem; height: 1.15rem; accent-color: var(--gold-dark); flex-shrink: 0; margin-top: .15rem; }

/* --- Choix (pills) ------------------------------------------------------- */
.choice {
  border: 1.5px solid #E2E8F0; border-radius: 1rem; background: #fff; padding: .9rem 1rem;
  text-align: left; transition: all .2s ease; cursor: pointer; width: 100%;
}
.choice:hover { border-color: rgba(212, 175, 55, .7); }
.choice.is-selected { border-color: var(--gold); background: #FBF6E6; box-shadow: 0 0 0 3px rgba(212, 175, 55, .18); }
.choice:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.slot {
  border: 1.5px solid #E2E8F0; border-radius: .75rem; padding: .6rem .5rem; font-weight: 700; font-size: .88rem;
  background: #fff; color: var(--navy-900); transition: all .2s ease; cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--gold); }
.slot.is-selected { background: var(--navy-900); color: var(--gold); border-color: var(--navy-900); }
.slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.day {
  border-radius: .85rem; padding: .55rem .25rem; text-align: center; border: 1.5px solid #E2E8F0; background: #fff;
  transition: all .2s ease; cursor: pointer; min-width: 0;
}
.day:hover:not(:disabled) { border-color: var(--gold); }
.day.is-selected { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.day.is-selected .day-num { color: var(--gold); }
.day:disabled { opacity: .35; cursor: not-allowed; }

/* --- Modales ------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .modal { align-items: center; padding: 1.5rem; } }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 23, 38, .7); backdrop-filter: blur(4px); animation: fadeIn .25s ease; }
.modal-panel {
  position: relative; width: 100%; max-width: 46rem; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 1.5rem 1.5rem 0 0; animation: slideUp .35s cubic-bezier(.2, .7, .2, 1);
  overscroll-behavior: contain;
}
@media (min-width: 640px) { .modal-panel { border-radius: 1.5rem; } }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; background: #F1F5F9; color: var(--navy-900); transition: background .2s, transform .2s;
}
.modal-close:hover { background: var(--gold); transform: rotate(90deg); }
body.modal-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* --- Article (modale de lecture) ---------------------------------------- */
.prose-pactum h3 { font-family: "Playfair Display", serif; font-size: 1.3rem; font-weight: 700; color: var(--navy-900); margin: 1.6rem 0 .6rem; }
.prose-pactum p { margin: 0 0 1rem; line-height: 1.8; color: #334155; }
.prose-pactum ul, .prose-pactum ol { margin: 0 0 1.2rem; padding-left: 0; list-style: none; }
.prose-pactum li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; line-height: 1.7; color: #334155; }
.prose-pactum li::before { content: ""; position: absolute; left: 0; top: .7em; width: .55rem; height: .55rem; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.prose-pactum strong { color: var(--navy-900); }
.prose-pactum .callout { border-left: 3px solid var(--gold); background: #FBF6E6; padding: 1rem 1.2rem; border-radius: 0 .75rem .75rem 0; margin: 1.4rem 0; }

/* --- Bouton WhatsApp flottant ------------------------------------------- */
.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 70;
  width: 3.6rem; height: 3.6rem; border-radius: 999px; background: #25D366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(37, 211, 102, .6); transition: transform .25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #25D366; z-index: -1;
  animation: pulse 2.4s ease-out infinite;
}
.wa-float .wa-tip {
  position: absolute; right: calc(100% + .75rem); white-space: nowrap; background: var(--navy-900); color: #fff;
  font-size: .8rem; font-weight: 600; padding: .5rem .8rem; border-radius: .6rem; opacity: 0; transform: translateX(8px);
  transition: all .25s ease; pointer-events: none;
}
.wa-float:hover .wa-tip { opacity: 1; transform: none; }
@keyframes pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }

/* --- Simulateur ---------------------------------------------------------- */
.progress-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width .5s ease; }
.answer {
  width: 100%; text-align: left; border: 1.5px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04);
  color: #fff; border-radius: 1rem; padding: 1rem 1.15rem; display: flex; align-items: center; gap: .9rem;
  transition: all .2s ease; cursor: pointer;
}
.answer:hover { border-color: var(--gold); background: rgba(212, 175, 55, .08); }
.answer.is-selected { border-color: var(--gold); background: rgba(212, 175, 55, .16); }
.answer .dot { width: 1.25rem; height: 1.25rem; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .4); flex-shrink: 0; transition: all .2s; }
.answer.is-selected .dot { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 45%, transparent 50%); }
.quiz-step { animation: stepIn .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.score-ring { transition: stroke-dashoffset 1.4s cubic-bezier(.2, .7, .2, 1); }

/* --- Toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 90; transform: translate(-50%, 30px); opacity: 0;
  background: var(--navy-900); color: #fff; padding: .9rem 1.3rem; border-radius: .9rem; font-weight: 600; font-size: .9rem;
  border: 1px solid rgba(212, 175, 55, .4); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5);
  transition: all .35s ease; max-width: calc(100vw - 2rem);
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

/* --- Divers -------------------------------------------------------------- */
.divider-gold { height: 1px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .7), transparent); }
.spinner { width: 1.1rem; height: 1.1rem; border-radius: 999px; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.marquee { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; } }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--gold); color: var(--navy-900); padding: .75rem 1rem; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* FAQ accordéon : masque la flèche native (Safari) */
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary:focus-visible{outline:2px solid #D4AF37;outline-offset:2px;border-radius:1rem}

/* Empêche tout défilement horizontal (animations, halos décoratifs) */
html, body { overflow-x: clip; }
