/* ============================================================
   Scriptonic — outils-common.css
   CSS commun à tous les outils web.
   Source unique de vérité pour : variables, reset, boutons,
   FAQ, section SEO, footer local, encadrés, disclaimer,
   animations et utilitaires.

   Chargé AVANT nav.css et le style.css local de chaque outil.
   Ne contient AUCUN composant spécifique à un outil.

   Ordre de chargement dans chaque HTML :
     1. outils-common.css  (ce fichier)
     2. nav.css             (header/footer partagé)
     3. style.css           (composants spécifiques à l'outil)
   ============================================================ */


/* ─────────────────────────────────────────────────────────────
   1. VARIABLES CSS
   Source unique. Ne jamais redéfinir dans un style.css local.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Palette principale */
  --primary:        #fbba32;
  --primary-dark:   #e0a520;
  --primary-glow:   rgba(251, 186, 50, 0.12);
  --primary-border: rgba(251, 186, 50, 0.4);

  /* Fonds */
  --dark:           #1a1a1a;
  --surface:        #0a0a0a;
  --surface-hover:  #111111;

  /* Texte */
  --light:          #ffffff;
  --muted:          #888888;

  /* Bordures */
  --border:         #333333;

  /* États */
  --warning-bg:     rgba(251, 186, 50, 0.08);
  --error:          #f44336;
  --success:        #4caf50;

  /* Transitions */
  --transition-fast:   200ms ease;
  --transition-normal: 350ms ease;

  /* Typographie */
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


/* ─────────────────────────────────────────────────────────────
   2. RESET ET BASE
   Appliqué globalement. Les outils locaux n'ont plus besoin
   de redéfinir *, html, body.
   ───────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
button { font-family: inherit; }

a {
  color: inherit;
  text-decoration: none;
}


/* ─────────────────────────────────────────────────────────────
   3. UTILITAIRES
   Classes réutilisables dans tous les outils.
   ───────────────────────────────────────────────────────────── */

/* Masquer un élément (prioritaire) */
.hidden {
  display: none !important;
}

/* Étiquette de section (label uppercase au-dessus d'un bloc) */
/* Utilisée dans Budget Estimator, ROI Simulator */
.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}


/* Animation d'apparition standard */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─────────────────────────────────────────────────────────────
   4. BANDEAU BRANDÉ
   Placé juste avant <main> dans chaque outil.
   Indépendant de nav.js. Toujours visible.
   Structure : <div class="tool-brand-banner">
                 <span class="tool-brand-name">Tempotonic</span>
                 <span class="tool-brand-by">by Scriptonic</span>
               </div>
   ───────────────────────────────────────────────────────────── */

.tool-brand-banner {
  text-align: center;
  padding: 0.5rem 1.5rem 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
}

.tool-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.tool-brand-by {
  font-size: 0.8rem;
  color: var(--muted);
}


/* ─────────────────────────────────────────────────────────────
   5. BOUTONS
   Système unifié. Noms canoniques : .btn, .btn-primary,
   .btn-secondary, .btn-ghost.
   Les variantes spécifiques (btn-next, btn-prev, cta-restart)
   restent dans le style.css local de l'outil concerné.
   ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--dark);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--light);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--light);
}

.btn-ghost {
  background-color: transparent;
  color: var(--muted);
  border: none;
}

.btn-ghost:hover {
  color: var(--light);
}


/* ─────────────────────────────────────────────────────────────
   5. ENCADRÉS (notice-box)
   Encadré avec bordure jaune à gauche. Utilisé pour les
   conseils (Tempotonic), l'accompagnement (Budget Estimator),
   les bénéfices qualitatifs (ROI Simulator).
   ───────────────────────────────────────────────────────────── */

.notice-box {
  border-left: 3px solid var(--primary);
  background-color: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.5rem;
}

.notice-box__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.notice-box p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--light);
}


/* ─────────────────────────────────────────────────────────────
   6. DISCLAIMER
   Texte légal/contextuel en bas de résultat.
   ───────────────────────────────────────────────────────────── */

.disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 28px;
}


/* ─────────────────────────────────────────────────────────────
   7. SECTION SEO
   Structure commune sous chaque outil. Contient le wrapper,
   le titre, l'intro, les colonnes et les styles de base.
   Le contenu des colonnes (dl/dt/dd, ul/li, p) peut varier
   par outil et reste dans le style.css local si nécessaire.
   ───────────────────────────────────────────────────────────── */

.seo-section {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.seo-container {
  max-width: 800px;
  margin: 0 auto;
}

.seo-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.seo-intro {
  margin-bottom: 2rem;
}

.seo-intro p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.seo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.seo-column h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.seo-column p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

/* Listes prix dans les colonnes SEO (Budget Estimator, etc.) */
.seo-column ul {
  list-style: none;
  padding: 0;
}

.seo-column ul li {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.seo-column ul li:last-child {
  margin-bottom: 0;
}

.seo-column ul li span {
  color: var(--light);
  font-weight: 500;
  white-space: nowrap;
}

/* Lien dans le contenu SEO */
.seo-column a,
.seo-section a {
  color: var(--primary);
  text-decoration: none;
}

.seo-column a:hover,
.seo-section a:hover {
  text-decoration: underline;
}

/* H3 autonomes dans la section SEO (hors colonnes) */
.seo-section > .seo-container > h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.seo-section > .seo-container > p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}


/* ─────────────────────────────────────────────────────────────
   8. FAQ
   Structure : <details class="faq-item">
                 <summary class="faq-question">...</summary>
                 <div class="faq-answer"><p>...</p></div>
               </details>
   Identique sur les 4 outils. Ne jamais utiliser de JS
   pour le toggle, details/summary est natif.
   ───────────────────────────────────────────────────────────── */

.seo-faq {
  margin-top: 2.5rem;
}

.seo-faq h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.faq-question {
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  cursor: pointer;
  list-style: none;
}

/* Supprimer le marker natif sur tous les navigateurs */
.faq-question::-webkit-details-marker {
  display: none;
}

/* Indicateur +/- à gauche */
.faq-question::before {
  content: '+';
  display: inline-block;
  width: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

details[open] .faq-question::before {
  content: '−';
}

.faq-answer {
  padding: 0 1rem 1rem 2.7rem;
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}


/* ─────────────────────────────────────────────────────────────
   9. FOOTER LOCAL
   Footer simple en bas de page, en plus du footer nav.js.
   Liens vers les autres outils.
   ───────────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-tools {
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

.footer-tools a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-tools a:hover {
  color: var(--primary);
}


/* ─────────────────────────────────────────────────────────────
   10. RESPONSIVE COMMUN
   Breakpoint principal : 768px.
   Les breakpoints spécifiques restent dans le style.css local.
   ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .seo-section {
    padding: 2rem 1rem;
  }

  .seo-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
