/* TABLEE STUDIO - feuille de style principale
   Palette : ivoire #F7F2EA / bordeaux #4A1728 / terracotta #C66A4A /
   charbon #252321 / beige #E8DED1. Direction : premium, editoriale,
   chaleureuse, minimaliste sans etre vide. Aucune 3D. */

:root {
  --ivoire: #f7f2ea;
  --bordeaux: #4a1728;
  --terracotta: #c66a4a;
  --charbon: #252321;
  --beige: #e8ded1;

  --bg: var(--ivoire);
  --text: var(--charbon);
  --text-muted: #5c5650;
  --accent: var(--terracotta);
  --accent-deep: var(--bordeaux);
  --surface: #ffffff;
  --border: var(--beige);

  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 12px 32px -18px rgba(37, 35, 33, 0.35);
  --transition-fast: 160ms ease;
  --transition-base: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1815;
    --text: #f3ece2;
    --text-muted: #c9bfb2;
    --surface: #262220;
    --border: #3a332d;
    --shadow-soft: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #1b1815;
  --text: #f3ece2;
  --text-muted: #c9bfb2;
  --surface: #262220;
  --border: #3a332d;
  --shadow-soft: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem);
}
h2 {
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.4rem);
}
h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

a {
  color: inherit;
}

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

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bordeaux);
  color: var(--ivoire);
  padding: 0.8em 1.2em;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terracotta), var(--bordeaux));
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--accent-deep);
}
.nav-toggle {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn--primary {
  background: var(--bordeaux);
  color: var(--ivoire);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn--secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--secondary:hover {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--beige);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.hero__note {
  margin-top: 1rem;
  font-size: 0.85rem;
}

/* Calendar mockup (2D animation, no 3D) */
.calendar-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem;
}
.calendar-mock__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.calendar-mock__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-mock__cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--beige);
  opacity: 0;
  transform: translateY(6px);
  animation: cellFill 600ms var(--transition-base) forwards;
}
.calendar-mock__cell--filled {
  background: var(--terracotta);
}
.calendar-mock__cell--filled2 {
  background: var(--bordeaux);
}
@keyframes cellFill {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards / sections */
.section {
  padding: 4.5rem 0;
}
.section--muted {
  background: var(--beige);
}
.section__head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--beige);
  margin-bottom: 1rem;
}

.example-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bordeaux);
  color: var(--ivoire);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step {
  position: relative;
  padding-top: 2.6rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--ivoire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: var(--accent-deep);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.price-card--featured::before {
  content: "Le plus choisi (hypothese)";
  position: absolute;
  top: -0.9rem;
  left: 1.6rem;
  background: var(--accent-deep);
  color: var(--ivoire);
  font-size: 0.72rem;
  padding: 0.3em 0.8em;
  border-radius: 999px;
}
.price-card__amount {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  margin: 0.4rem 0 1rem;
}
.price-card__amount span {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  flex: 1;
}
.price-card li {
  padding: 0.5em 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}
.price-disclaimer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  font-family: var(--font-serif);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition-fast);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  padding-bottom: 1.1rem;
}

/* CTA band */
.cta-band {
  background: var(--bordeaux);
  color: var(--ivoire);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
}
.cta-band h2,
.cta-band p {
  color: var(--ivoire);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-size: 0.95rem;
  color: var(--text);
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-grid li {
  margin-bottom: 0.5em;
}
.footer-grid a {
  text-decoration: none;
  color: var(--text-muted);
}
.footer-grid a:hover {
  color: var(--accent-deep);
}
.legal-note {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  font-size: 0.8rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Generic page content (FAQ, legal, pricing standalone) */
.prose h2 {
  margin-top: 2.2rem;
}
.prose p,
.prose li {
  color: var(--text-muted);
}

/* Demo page */
.demo-form {
  display: grid;
  gap: 1rem;
  max-width: 480px;
}
.demo-form label {
  font-weight: 600;
  font-size: 0.9rem;
}
.demo-form input,
.demo-form select {
  width: 100%;
  padding: 0.75em 0.9em;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.demo-form input:focus-visible,
.demo-form select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}
.demo-result {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}
.demo-result[hidden] {
  display: none;
}
.status-msg {
  font-size: 0.9rem;
  padding: 0.8em 1em;
  border-radius: 10px;
  background: var(--beige);
}
.status-msg--error {
  background: #f8d9d0;
  color: var(--bordeaux);
}

/* Responsive */
@media (max-width: 920px) {
  /* backdrop-filter sur .site-header cree un bloc englobant pour les
     descendants position:fixed (dont .nav ouvert), ce qui cassait son
     positionnement plein ecran sur mobile (hauteur limitee a celle du
     header). Desactive uniquement sur mobile ; conserve sur desktop. */
  .site-header {
    backdrop-filter: none;
  }
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .grid-2,
  .steps,
  .pricing-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility 0s linear var(--transition-base);
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--transition-base), transform var(--transition-base);
  }
  .nav-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
  }
}
