    /* ==========================================================================
   Megatexto.net — Feuille de style moderne (responsive, mobile-first)
   ========================================================================== */

:root {
  --bg: #0f1115;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --text: #1c1f26;
  --text-muted: #6b7280;
  --primary: #007aff;
  --primary-dark: #0062cc;
  --border: #e5e7eb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(16, 24, 40, .08);
  --shadow-lg: 0 10px 40px rgba(16, 24, 40, .14);

  /* iOS bubbles */
  --ios-out-bg: #0b93f6;
  --ios-out-text: #ffffff;
  --ios-in-bg: #e9e9eb;
  --ios-in-text: #000000;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ------------------------------------------------------------------ Accessibilité */
:focus-visible {
  outline: 3px solid rgba(0,122,255,.55);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.pagination__num:focus-visible,
.pagination__arrow:focus-visible,
.texto-nav__link:focus-visible {
  outline: 3px solid rgba(0,122,255,.55);
  outline-offset: 2px;
}

/* Lien d'évitement : visible au focus clavier */
.skip-link:focus {
  left: 8px; top: 8px; border-radius: 8px;
  text-decoration: underline;
}

/* États désactivés explicites */
[aria-disabled="true"] { pointer-events: none; }

/* Contenu réservé aux lecteurs d'écran */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Contraste renforcé pour le texte secondaire sur fond clair */
.texto__meta, .page-lead, .site-footer__text, .site-footer__tagline { color: #5b6472; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #000; color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo {
  height: 44px; width: auto;
  transition: transform .2s ease;
}
.brand:hover .brand__logo { transform: rotate(-3deg) scale(1.04); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 6px;
}
.site-nav__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  color: var(--text); font-weight: 600; font-size: 15px;
  letter-spacing: -.01em;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.site-nav__emoji {
  font-size: 16px; line-height: 1;
  transition: transform .18s ease;
}
.site-nav__link:hover {
  text-decoration: none; color: var(--primary);
  background: linear-gradient(135deg, rgba(0,122,255,.10), rgba(255,45,146,.10));
  transform: translateY(-2px);
}
.site-nav__link:hover .site-nav__emoji { transform: scale(1.25) rotate(-8deg); }

/* Lien actif : fond coloré */
.site-nav__link.is-current {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(0,122,255,.12), rgba(255,45,146,.12));
}

/* Bouton d'action "Propose ton texto" */
.site-nav__link--cta {
  color: #fff;
  background: linear-gradient(135deg, #007aff, #ff2d92);
  box-shadow: 0 4px 14px rgba(255,45,146,.32);
}
.site-nav__link--cta:hover {
  color: #fff;
  background: linear-gradient(135deg, #0062cc, #e01f7e);
  box-shadow: 0 6px 20px rgba(255,45,146,.42);
}
.site-nav__link--cta.is-current {
  color: #fff;
  background: linear-gradient(135deg, #0062cc, #e01f7e);
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px; cursor: pointer;
  border-radius: 10px;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle span {
  width: 24px; height: 3px; background: var(--text); border-radius: 3px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; inset: 68px 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .site-nav.is-open { max-height: 70vh; }
  .site-nav ul { flex-direction: column; padding: 10px 16px 16px; gap: 4px; }
  .site-nav__link {
    padding: 14px 16px; border-radius: var(--radius-sm);
    font-size: 16px;
  }
}

/* ------------------------------------------------------------------ Layout */
.layout {
  display: block;
  padding-block: 28px 56px;
}
.content { min-width: 0; }

/* ------------------------------------------------------------------ Cards */
.texto {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.texto__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.texto__title { font-size: 18px; font-weight: 600; margin: 0; }
.texto__meta { font-size: 13px; color: var(--text-muted); margin: 6px 0 12px; }
.texto__divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ------------------------------------------------------------------ Vote */
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vote__btn {
  border: 0; background: transparent; cursor: default;
  font-size: 14px; color: var(--text-muted); opacity: .55;
}
.vote__score { font-weight: 700; font-size: 15px; }

/* ------------------------------------------------------------------ Phone */
.phone {
  position: relative;
  width: 100%; max-width: 340px;
  margin: 8px auto 0;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #2b2b2e;
}
.phone__notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px; background: #000; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone__screen {
  position: relative;
  background: #fff;
  border-radius: 34px;
  overflow: hidden;
  min-height: 520px;
  display: flex; flex-direction: column;
}
.phone__statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 22px 4px; font-size: 12px; font-weight: 600; color: #000;
}
.phone__icons { letter-spacing: 1px; }
.phone__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(249,249,249,.9);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 2;
}
.phone__contact { font-size: 13px; font-weight: 600; }
.phone__back { color: var(--primary); font-size: 26px; line-height: 1; }
.phone__cam { font-size: 16px; }
.phone__messages {
  flex: 1;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  background: #fff;
  overflow-y: auto;
}
.bubble {
  max-width: 78%;
  padding: 9px 14px;
  font-size: 15px;
  line-height: 1.35;
  border-radius: 20px;
  position: relative;
  word-wrap: break-word;
  animation: bubble-in .25s ease both;
}
.bubble--in {
  align-self: flex-start;
  background: var(--ios-in-bg);
  color: var(--ios-in-text);
  border-bottom-left-radius: 6px;
}
.bubble--out {
  align-self: flex-end;
  background: var(--ios-out-bg);
  color: var(--ios-out-text);
  border-bottom-right-radius: 6px;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.phone__empty { color: var(--text-muted); font-size: 14px; }
.phone__input {
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  color: var(--text-muted); font-size: 14px;
  background: rgba(249,249,249,.95);
}
.phone__input span {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 999px; width: 100%;
}

@media (max-width: 380px) {
  .phone { border-radius: 34px; padding: 8px; }
  .phone__screen { border-radius: 26px; min-height: 460px; }
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-block; text-align: center;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; margin: 4px 0; width: 100%;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--ghost:hover { background: rgba(0,122,255,.08); text-decoration: none; }

/* Bouton Facebook (réseau social) */
.btn--facebook {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #1877f2; color: #fff; border-color: #1877f2;
  width: auto; min-width: 180px;
}
.btn--facebook:hover { background: #0f65d6; text-decoration: none; color: #fff; }
.btn__icon { flex: 0 0 auto; }

/* ------------------------------------------------------------------ Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input,
.field textarea {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; font-family: inherit;
}
.field input:focus,
.field textarea:focus { outline: 2px solid rgba(0,122,255,.35); border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 120px; }
.field__hint {
  font-weight: 500; font-size: 12px; color: var(--text-muted);
}
.field__help {
  margin: 6px 0 0; font-size: 13px; color: var(--text-muted);
}
.field__hint.is-over { color: #b3261e; font-weight: 700; }
.captcha-img { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }

/* Champ honeypot : masqué (ne doit jamais être visible/vu au clavier) */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

/* ------------------------------------------------------------------ Page proposition : form + aperçu */
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.submit-layout__form { min-width: 0; }
.submit-layout__preview {
  position: sticky;
  top: 88px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.preview-label {
  margin: 0 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); text-align: center;
}
@media (max-width: 860px) {
  .submit-layout { grid-template-columns: 1fr; gap: 20px; }
  .submit-layout__preview { position: static; }
}

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert--success { background: #e7f6ec; color: #1c7a3e; border: 1px solid #b7e3c5; }
.alert--error { background: #fdecea; color: #b3261e; border: 1px solid #f6c6c2; }
.alert--success .alert__link a { word-break: break-all; font-weight: 600; }
.alert--success .btn { margin-top: 8px; }

/* ------------------------------------------------------------------ Listing helpers */
.pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; margin: 32px 0 16px;
}
.pagination__list {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.pagination__num,
.pagination__arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.pagination__num:hover,
.pagination__arrow:hover {
  text-decoration: none; background: var(--surface-2); border-color: #cfd5df;
  transform: translateY(-1px);
}
.pagination__num.is-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,122,255,.35); cursor: default;
}
.pagination__ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--text-muted); user-select: none; font-weight: 700;
}
.pagination__arrow { color: var(--primary); font-size: 16px; }
.pagination__arrow.is-disabled {
  opacity: .4; cursor: not-allowed; color: var(--text-muted);
  border-color: var(--border); background: #fff;
}
/* Flèches côte à côte avec les numéros : un peu d'air autour */
.pagination__arrow:first-child { margin-right: 2px; }
.pagination__arrow:last-child { margin-left: 2px; }

@media (max-width: 420px) {
  .pagination__num, .pagination__arrow, .pagination__ellipsis {
    width: 36px; height: 36px; font-size: 13px;
  }
}

/* Nav Précédent / Suivant sur la page d'un texto */
.texto-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 20px;
}
.texto-nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  box-shadow: var(--shadow);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.texto-nav__link--next { justify-content: flex-end; text-align: right; }
.texto-nav__link:hover {
  text-decoration: none; background: var(--surface-2); border-color: #d3d8e0;
  transform: translateY(-1px);
}
.texto-nav__link.is-disabled {
  opacity: .45; cursor: not-allowed; box-shadow: none; background: var(--surface-2);
}
.texto-nav__arrow { font-size: 18px; color: var(--primary); line-height: 1; flex: 0 0 auto; }
.texto-nav__text { display: flex; flex-direction: column; overflow: hidden; }
.texto-nav__label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); font-weight: 700;
}
.texto-nav__title {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
@media (max-width: 520px) {
  .texto-nav { grid-template-columns: 1fr; }
  .texto-nav__title { display: none; }
  .texto-nav__link { justify-content: center; }
}

.page-title { font-size: 24px; margin: 0 0 6px; }
.page-lead { color: var(--text-muted); margin: 0 0 24px; font-size: 15px; }

/* ------------------------------------------------------------------ Partage social */
.share {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.share__label {
  display: block; font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px;
}
.share__buttons {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.share__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  text-decoration: none; line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.share__btn:hover {
  text-decoration: none; transform: translateY(-1px);
  background: var(--surface-2); border-color: #cfd5df;
}
.share__btn--native { background: var(--primary); color: #fff; border-color: var(--primary); }
.share__btn--native:hover { background: var(--primary-dark); color: #fff; }
.share__btn--whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.share__btn--whatsapp:hover { background: #1eb955; color: #fff; }
.share__btn--facebook-share { background: #1877f2; color: #fff; border-color: #1877f2; }
.share__btn--facebook-share:hover { background: #0f65d6; color: #fff; }
.share__btn--x { background: #000; color: #fff; border-color: #000; }
.share__btn--x:hover { background: #222; color: #fff; }
.share__feedback {
  margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #1c7a3e;
}
@media (max-width: 480px) {
  .share__btn { flex: 1 1 auto; justify-content: center; }
}

/* ------------------------------------------------------------------ Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 16px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.2fr 1fr;
  gap: 32px;
  padding-block: 40px;
  align-items: start;
}
.site-footer__col--brand { max-width: 320px; }
.site-footer__logo { height: 36px; width: auto; margin-bottom: 10px; }
.site-footer__tagline { color: var(--text-muted); font-size: 14px; margin: 0; }
.site-footer__title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 700; margin: 0 0 12px;
}
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: 8px; }
.site-footer__links a { color: var(--text); font-size: 14px; }
.site-footer__links a:hover { color: var(--primary); text-decoration: none; }
.site-footer__text { color: var(--text-muted); font-size: 14px; margin: 0 0 14px; }
.site-footer__col .btn { width: auto; min-width: 160px; }
.site-footer__col--ad { min-height: 120px; }

.site-footer__bottom {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding-block: 18px;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer__bottom .container {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  align-items: center; justify-content: space-between;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--text-muted); }
.site-footer__bottom a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer__col--brand { grid-column: 1 / -1; max-width: none; }
  .site-footer__col--ad { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* --------------------------------------------------- Pub Amazon (SiteStripe) */
.amazon-ads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 8px;
}

.amazon-ads__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.amazon-ads__card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #ff9900;
  box-shadow: var(--shadow-lg);
}

.amazon-ads__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 999px;
}

.amazon-ads__img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  margin-top: 6px;
  background: #fff;
  border-radius: 8px;
}

.amazon-ads__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #ff9900;
  color: #111;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s ease;
}

.amazon-ads__card:hover .amazon-ads__cta { background: #f3a800; }

.amazon-ads__disclaimer {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .amazon-ads { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .amazon-ads { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
