/**
 * outils.css : design system commun aux pages /outils/*.
 *
 * Chargé via <slot name="head"> sur chaque page outil plutôt que dupliqué en
 * <style> scopé (4 pages x ~250 lignes de CSS identiques sinon).
 *
 * Palette reprise du site : violet #7B1FD4, magenta #AD2184, encre #1A0C28.
 * Pas de badge, pas de pill, pas d'emoji : la hiérarchie passe par la typo.
 */

:root {
  --ot-violet: #7b1fd4;
  --ot-violet-dark: #6b1ab8;
  --ot-magenta: #ad2184;
  --ot-ink: #1a0c28;
  --ot-body: #444;
  --ot-muted: #6b6577;
  --ot-border: #e5dcfa;
  --ot-tint: #f7f0ff;
  --ot-white: #fff;
  --ot-radius: 14px;
  --ot-radius-lg: 20px;
  --ot-font-head: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ot-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Page ──────────────────────────────────────────────────────────── */

.ot-page {
  background: linear-gradient(180deg, #faf8ff 0%, #f3edff 100%);
  min-height: 80vh;
  padding: 56px 20px 72px;
  font-family: var(--ot-font-body);
  color: var(--ot-body);
}

.ot-container {
  max-width: 880px;
  margin: 0 auto;
}

.ot-container-wide {
  max-width: 1080px;
}

/* ─── Fil d'ariane ──────────────────────────────────────────────────── */

.ot-crumb {
  font-size: 13px;
  color: var(--ot-muted);
  margin: 0 0 20px;
}

.ot-crumb a {
  color: var(--ot-muted);
  text-decoration: none;
}

.ot-crumb a:hover {
  color: var(--ot-violet);
  text-decoration: underline;
}

/* ─── En-tête ───────────────────────────────────────────────────────── */

.ot-header {
  margin-bottom: 36px;
}

.ot-header h1 {
  font-family: var(--ot-font-head);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ot-ink);
  margin: 0 0 14px;
}

.ot-header p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ot-muted);
  max-width: 640px;
  margin: 0;
}

@media (max-width: 640px) {
  .ot-header h1 {
    font-size: 28px;
  }
  .ot-header p {
    font-size: 15px;
  }
}

/* ─── Cartes ────────────────────────────────────────────────────────── */

.ot-card {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  padding: 28px;
  box-shadow: 0 8px 28px rgba(26, 12, 40, 0.05);
}

.ot-card + .ot-card {
  margin-top: 20px;
}

.ot-card h2 {
  font-family: var(--ot-font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--ot-ink);
  margin: 0 0 4px;
}

.ot-card-sub {
  font-size: 14px;
  color: var(--ot-muted);
  margin: 0 0 22px;
  line-height: 1.55;
}

.ot-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 720px) {
  .ot-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ─── Champs ────────────────────────────────────────────────────────── */

.ot-field {
  margin-bottom: 18px;
}

.ot-field:last-child {
  margin-bottom: 0;
}

.ot-label {
  display: block;
  font-family: var(--ot-font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--ot-ink);
  margin: 0 0 7px;
}

.ot-hint {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ot-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.ot-input,
.ot-select,
.ot-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius);
  background: var(--ot-white);
  color: var(--ot-ink);
  font-family: var(--ot-font-body);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ot-textarea {
  min-height: 92px;
  resize: vertical;
}

/* Le chevron natif des <select> se colle à l'arrondi du champ et change de
   position selon le navigateur. On le remplace par un chevron maison, calé
   à 16px du bord, avec la réserve de padding correspondante. */
.ot-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%231a0c28' stroke-opacity='.55' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
  /* Un libellé plus long que le champ est coupé net par le navigateur :
     l'ellipse rend la troncature lisible plutôt qu'accidentelle. */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Sélecteur d'indicatif : plus étroit, le chevron se rapproche d'autant. */
.ot-row .ot-select {
  padding-right: 34px;
  background-position: right 12px center;
}

.ot-select:hover {
  border-color: rgba(123, 31, 212, 0.35);
}

.ot-input:focus,
.ot-select:focus,
.ot-textarea:focus {
  outline: none;
  border-color: var(--ot-violet);
  box-shadow: 0 0 0 3px rgba(123, 31, 212, 0.12);
}

.ot-input[aria-invalid='true'] {
  border-color: #c0392b;
}

.ot-row {
  display: flex;
  gap: 10px;
}

.ot-row .ot-select {
  width: auto;
  flex: 0 0 112px;
}

.ot-row .ot-input {
  flex: 1;
}

/* Curseurs : réglages rapides au pouce sur mobile. */
.ot-range {
  width: 100%;
  accent-color: var(--ot-violet);
  margin: 6px 0 0;
}

.ot-range-value {
  font-family: var(--ot-font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ot-violet);
}

/* ─── Boutons ───────────────────────────────────────────────────────── */

.ot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: none;
  border-radius: 100px;
  font-family: var(--ot-font-head);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
}

.ot-btn-primary {
  background: linear-gradient(135deg, var(--ot-violet) 0%, var(--ot-magenta) 100%);
  color: var(--ot-white);
}

.ot-btn-primary:hover {
  transform: translateY(-1px);
}

.ot-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ot-btn-ghost {
  background: var(--ot-tint);
  color: var(--ot-violet);
  border: 1px solid var(--ot-border);
}

.ot-btn-ghost:hover {
  background: #f0e6ff;
}

.ot-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Récapitulatif en français ─────────────────────────────────────── */
/* Reformule la saisie du visiteur avant d'afficher un chiffre : sans cette
   phrase, un formulaire de calcul reste abstrait. */

.ot-recap {
  background: var(--ot-tint);
  border-left: 3px solid var(--ot-violet);
  border-radius: 0 var(--ot-radius) var(--ot-radius) 0;
  padding: 16px 18px;
  margin: 26px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ot-ink);
}

.ot-recap strong {
  font-weight: 600;
  color: var(--ot-violet);
}

/* ─── Repli des réglages avancés ────────────────────────────────────── */

.ot-more {
  margin-top: 22px;
  border-top: 1px solid var(--ot-border);
  padding-top: 18px;
}

.ot-more summary {
  cursor: pointer;
  font-family: var(--ot-font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--ot-violet);
  list-style: none;
}

.ot-more summary::-webkit-details-marker {
  display: none;
}

.ot-more summary::before {
  content: '+ ';
  font-weight: 700;
}

.ot-more[open] summary::before {
  content: '− ';
}

.ot-more-body {
  padding-top: 20px;
}

/* ─── Résultats ─────────────────────────────────────────────────────── */

.ot-result {
  background: linear-gradient(135deg, #1a0c28 0%, #2a1640 100%);
  border-radius: var(--ot-radius-lg);
  padding: 30px 28px;
  color: var(--ot-white);
  margin-top: 20px;
}

.ot-result h2 {
  font-family: var(--ot-font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--ot-white);
  margin: 0 0 20px;
}

.ot-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.ot-stat-value {
  font-family: var(--ot-font-head);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ot-white);
  display: block;
}

.ot-stat-hero .ot-stat-value {
  font-size: 40px;
  background: linear-gradient(135deg, #c68cff 0%, #ff8fc4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ot-stat-label {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 7px;
}

.ot-result-note {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ─── Sortie texte (générateurs) ────────────────────────────────────── */

.ot-output {
  background: #fbfaff;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius);
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ot-ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow-y: auto;
}

.ot-output-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--ot-violet);
  word-break: break-all;
}

/* ─── Encart d'avertissement ────────────────────────────────────────── */

.ot-notice {
  background: #fff8e8;
  border: 1px solid #f0dcae;
  border-radius: var(--ot-radius);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #6b5312;
  margin-top: 20px;
}

.ot-notice strong {
  color: #4a3908;
}

/* ─── Formulaire de capture ─────────────────────────────────────────── */

.ot-capture {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  padding: 28px;
  margin-top: 20px;
  box-shadow: 0 8px 28px rgba(26, 12, 40, 0.05);
}

.ot-capture h2 {
  font-family: var(--ot-font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--ot-ink);
  margin: 0 0 6px;
}

.ot-capture-sub {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ot-muted);
  margin: 0 0 22px;
}

.ot-capture-trust {
  font-size: 12px;
  color: var(--ot-muted);
  margin: 14px 0 0;
  line-height: 1.6;
}

.ot-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ot-msg {
  border-radius: var(--ot-radius);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  margin-top: 16px;
}

.ot-msg-ok {
  background: #edfaf1;
  border: 1px solid #b8e6c8;
  color: #1c6b38;
}

.ot-msg-ko {
  background: #fdeeec;
  border: 1px solid #f2c2bb;
  color: #a02b1c;
}

/* ─── Bloc de conversion final ──────────────────────────────────────── */

.ot-cta {
  background: linear-gradient(135deg, #1a0c28 0%, #2a1640 100%);
  color: var(--ot-white);
  border-radius: var(--ot-radius-lg);
  padding: 38px 30px;
  text-align: center;
  margin-top: 28px;
}

.ot-cta h2 {
  font-family: var(--ot-font-head);
  font-size: 21px;
  font-weight: 700;
  color: var(--ot-white);
  margin: 0 0 12px;
}

.ot-cta p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
  margin: 0 auto 24px;
}

.ot-cta .ot-btn-row {
  justify-content: center;
}

.ot-cta .ot-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--ot-white);
}

.ot-cta .ot-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Contenu SEO sous l'outil ──────────────────────────────────────── */

.ot-prose {
  margin-top: 40px;
}

.ot-prose h2 {
  font-family: var(--ot-font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--ot-ink);
  margin: 34px 0 14px;
}

.ot-prose h3 {
  font-family: var(--ot-font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--ot-ink);
  margin: 24px 0 8px;
}

.ot-prose p,
.ot-prose li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ot-body);
}

.ot-prose p {
  margin: 0 0 14px;
}

.ot-prose ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.ot-prose li {
  margin-bottom: 7px;
}

.ot-prose a {
  color: var(--ot-violet);
}

/* ─── FAQ en accordéon ──────────────────────────────────────────────── */
/* Même comportement et même apparence que /faq/ : marqueur + / − à droite,
   carte qui se souligne de violet à l'ouverture. */

.ot-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.ot-faq {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ot-faq[open] {
  border-color: var(--ot-violet);
  box-shadow: 0 8px 24px rgba(123, 31, 212, 0.08);
}

.ot-faq summary {
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  font-family: var(--ot-font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ot-ink);
  list-style: none;
  position: relative;
  transition: color 0.15s;
}

.ot-faq summary::-webkit-details-marker {
  display: none;
}

.ot-faq summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--ot-tint);
  color: var(--ot-violet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.15s;
}

.ot-faq[open] summary::after {
  content: '−';
  background: var(--ot-violet);
  color: var(--ot-white);
}

.ot-faq summary:hover {
  color: var(--ot-violet);
}

.ot-faq-answer {
  padding: 0 22px 20px;
}

.ot-prose .ot-faq-answer p {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
  margin: 0;
}

/* ─── Grille de l'index /outils ─────────────────────────────────────── */

.ot-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.ot-tool {
  display: flex;
  flex-direction: column;
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  padding: 26px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ot-tool:hover {
  border-color: var(--ot-violet);
  box-shadow: 0 12px 30px rgba(123, 31, 212, 0.1);
  transform: translateY(-2px);
}

/* Icône maison : carré 30x30 arrondi, fond teinté, SVG outlined 1.6. */
.ot-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(123, 31, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex: none;
}

.ot-ico svg {
  width: 17px;
  height: 17px;
  stroke: var(--ot-violet);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ot-tool h2 {
  font-family: var(--ot-font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ot-ink);
  margin: 0 0 8px;
}

.ot-tool p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ot-muted);
  margin: 0 0 18px;
  flex: 1;
}

.ot-tool-go {
  font-family: var(--ot-font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--ot-violet);
}
