/* tonsite.info — feuille de style */
:root {
  --fond: #f5f6fb;
  --surface: #ffffff;
  --encre: #171b2c;
  --doux: #586079;
  --trait: #e3e6f0;
  --accent: #4f46e5;
  --accent-fonce: #3730a3;
  --accent-pale: #eef0ff;
  --turquoise: #0ea5a4;
  --corail: #ff6b5a;
  --soleil: #ffd166;
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(23, 27, 44, .06), 0 8px 24px rgba(23, 27, 44, .07);
  --ombre-forte: 0 2px 6px rgba(23, 27, 44, .08), 0 18px 40px rgba(23, 27, 44, .14);
  --police: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1.0625rem/1.65 var(--police); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-fonce); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.conteneur { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -9999px; top: .5rem; background: var(--encre); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 50; }
.evitement:focus { left: .5rem; }

/* ---------- En-tête ---------- */
.entete { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 20; }
.entete-barre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0 .2rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--encre); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.logo:hover { color: var(--encre); }
.logo-icone { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--accent); background: linear-gradient(135deg, var(--accent), var(--turquoise)); box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.logo-icone svg { width: 26px; height: 26px; }
.logo-ext { color: var(--accent); }
.slogan { margin: 0; color: var(--doux); font-size: .92rem; }
.nav-papiers ul { list-style: none; margin: 0 auto; padding: .45rem 0 .6rem; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.nav-papiers ul::-webkit-scrollbar { display: none; }
.nav-papiers a { display: block; white-space: nowrap; padding: .35rem .85rem; border-radius: 999px; color: var(--doux); text-decoration: none; font-size: .93rem; font-weight: 600; border: 1px solid transparent; }
.nav-papiers a:hover { background: var(--accent-pale); color: var(--accent-fonce); }
.nav-papiers a[aria-current] { background: var(--encre); color: #fff; }
@media (max-width: 40rem) { .slogan { display: none; } }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .78rem 1.15rem; border-radius: 13px; border: 1px solid transparent; font: 650 1rem/1.1 var(--police); text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-principal { color: #fff; background: linear-gradient(135deg, var(--accent), #6d5df6); box-shadow: 0 8px 20px rgba(79, 70, 229, .32); }
.btn-principal:hover { color: #fff; box-shadow: 0 10px 26px rgba(79, 70, 229, .42); transform: translateY(-1px); }
.btn-secondaire { color: var(--encre); background: var(--surface); border-color: var(--trait); }
.btn-secondaire:hover { color: var(--accent-fonce); border-color: #c9ccf8; background: var(--accent-pale); }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Héros ---------- */
.heros { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(40rem 22rem at 85% 10%, rgba(14, 165, 164, .14), transparent 70%),
    radial-gradient(36rem 24rem at 10% 90%, rgba(79, 70, 229, .13), transparent 70%),
    radial-gradient(20rem 14rem at 60% 100%, rgba(255, 107, 90, .10), transparent 70%); }
.heros-grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.surtitre { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .02em; color: var(--accent-fonce); background: var(--accent-pale); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.1rem; }
.heros h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
.souligne { background: linear-gradient(transparent 62%, rgba(255, 209, 102, .85) 62%, rgba(255, 209, 102, .85) 92%, transparent 92%); padding: 0 .1em; }
.chapo { font-size: 1.14rem; color: var(--doux); max-width: 40rem; }
.heros-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.heros-visuel { position: relative; height: 380px; }
.feuille { position: absolute; width: 230px; aspect-ratio: 60 / 80; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--ombre-forte); }
.feuille svg { display: block; width: 100%; height: 100%; }
.feuille-1 { left: 4%; top: 30px; transform: rotate(-9deg); }
.feuille-2 { left: 30%; top: 0; transform: rotate(3deg); z-index: 2; }
.feuille-3 { left: 52%; top: 50px; transform: rotate(11deg); }
@media (max-width: 56rem) {
  .heros-grille { grid-template-columns: 1fr; gap: 1.5rem; }
  .heros-visuel { height: 250px; }
  .feuille { width: 150px; }
}

/* ---------- Blocs, cartes ---------- */
.bloc { margin-block: clamp(2.5rem, 5vw, 4rem); }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 1.1rem; }
.carte { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--encre); box-shadow: var(--ombre); transition: transform .15s, box-shadow .15s, border-color .15s; }
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); border-color: #cfd2fb; color: var(--encre); }
.carte-vignette { display: block; aspect-ratio: 72 / 48; background: #fff; border-bottom: 1px solid var(--trait); }
.carte-vignette svg { display: block; width: 100%; height: 100%; }
.carte-corps { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.carte-titre { margin: 0; font-size: 1.12rem; }
.carte-resume { color: var(--doux); font-size: .95rem; line-height: 1.5; flex: 1; }
.carte-lien { color: var(--accent); font-weight: 700; font-size: .93rem; margin-top: .3rem; }

.atouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.atout { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1.3rem 1.3rem 1rem; }
.atout-icone { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-pale); font-size: 1.4rem; margin-bottom: .8rem; }
.atout p { color: var(--doux); font-size: .97rem; }

.modeles-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem 1.6rem; }
.modeles-groupe h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.modeles-groupe h3 a { color: var(--encre); text-decoration: none; }
.modeles-groupe ul { list-style: none; margin: 0; padding: 0; }
.modeles-groupe li { padding: .22rem 0; font-size: .95rem; }
.modeles-groupe li a { color: var(--doux); text-decoration: none; }
.modeles-groupe li a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Page outil ---------- */
.fil ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 1.1rem 0 .7rem; padding: 0; font-size: .9rem; color: var(--doux); }
.fil li + li::before { content: "›"; margin-right: .3rem; color: #a0a6b8; }
.fil a { color: var(--doux); text-decoration: none; }
.fil a:hover { color: var(--accent); }
.tete-outil { margin-bottom: 1.4rem; }
.tete-outil h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); margin-bottom: .4em; }
.tete-outil .chapo { font-size: 1.06rem; }
.tete-outil .chapo { margin-bottom: 0; }

.outil { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre); }
.panneau-reglages { padding: 1.3rem 1.3rem 1rem; position: sticky; top: 118px; max-height: calc(100vh - 135px); overflow: auto; }
.panneau-titre { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); margin-bottom: .9rem; }
.groupe { display: grid; gap: .85rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--trait); }
.champ label, .etiquette-champ { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-weight: 650; font-size: .93rem; margin-bottom: .35rem; }
.champ output { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.champ select { width: 100%; font: inherit; font-size: .98rem; padding: .55rem 2.2rem .55rem .75rem; border: 1px solid #d5d9e6; border-radius: 11px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23586079' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right .8rem center; appearance: none; color: var(--encre); }
.champ select:hover { border-color: #b9bee0; }
.champ input[type=range] { width: 100%; accent-color: var(--accent); }
.champ-case { display: flex; align-items: center; gap: .55rem; }
.champ-case label { margin: 0; font-weight: 550; }
.champ-case input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }
.nuancier { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--trait); }
.pastille { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.pastille[aria-checked="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--encre); }
.pastille-libre { display: grid; place-items: center; background: conic-gradient(#ff6b5a, #ffd166, #0ea5a4, #4f46e5, #c026d3, #ff6b5a); overflow: hidden; }
.pastille-libre input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.plus summary { cursor: pointer; font-weight: 700; font-size: .95rem; color: var(--accent-fonce); margin-bottom: .8rem; }
.lien-reinit { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--doux); text-decoration: underline; cursor: pointer; }

.panneau-apercu { padding: 1.2rem; }
.apercu-cadre { border-radius: 16px; padding: clamp(1rem, 3vw, 2rem); background-color: #eceef6; background-image: radial-gradient(#d7dbe9 1px, transparent 1px); background-size: 14px 14px; }
.apercu-feuille { position: relative; }
.apercu-page { height: min(56vh, 640px); width: 100%; aspect-ratio: auto !important; }
.apercu-page svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(23, 27, 44, .12)) drop-shadow(0 12px 22px rgba(23, 27, 44, .14)); }
.apercu-loupe { position: absolute; right: -6px; bottom: -6px; width: 136px; height: 136px; margin: 0; border-radius: 50%; overflow: hidden; background: #fff; border: 4px solid #fff; box-shadow: var(--ombre-forte), 0 0 0 1px var(--trait); }
.apercu-detail, .apercu-detail svg { display: block; width: 100%; height: 100%; }
.apercu-legende { text-align: center; color: var(--doux); font-size: .9rem; margin: .8rem 0 1rem; font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.actions .btn:first-child { grid-column: 1 / -1; padding-block: .95rem; font-size: 1.05rem; }
.actions .btn:last-child { grid-column: 1 / -1; }
.astuce { margin: 1rem 0 0; font-size: .9rem; color: var(--doux); background: #fff8e6; border: 1px solid #ffe7a8; border-radius: 12px; padding: .65rem .85rem; }
.avertissement { background: #fff1ef; border: 1px solid #ffd2cc; border-radius: 12px; padding: .7rem .9rem; color: #8a2a1f; }
@media (max-width: 60rem) {
  .outil { grid-template-columns: 1fr; }
  .panneau-reglages { position: static; max-height: none; order: 2; }
  .panneau-apercu { order: 1; }
  .apercu-page { height: min(58vh, 560px); }
  .apercu-loupe { width: 96px; height: 96px; }
}

/* ---------- Texte, FAQ ---------- */
.colonnes { margin-top: 1rem; }
.colonne-texte { max-width: 52rem; }
.texte h2 { margin-top: 2.2rem; }
.texte ul { padding-left: 1.2rem; }
.texte li { margin-bottom: .35rem; }
.renvoi { background: var(--accent-pale); border-radius: 14px; padding: .9rem 1.1rem; }
.puces-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.puces-liens a { display: block; padding: .5rem .95rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--trait); color: var(--encre); text-decoration: none; font-size: .94rem; font-weight: 600; }
.puces-liens a:hover { border-color: #c9ccf8; background: var(--accent-pale); color: var(--accent-fonce); }
.puces-liens a[aria-current] { background: var(--encre); border-color: var(--encre); color: #fff; }
.faq details { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: .95rem 1.15rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .7rem 0 0; color: var(--doux); }
.texte-legal { max-width: 50rem; background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; padding: clamp(1.3rem, 4vw, 2.6rem); margin-bottom: 3rem; }
.texte-legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.tableau { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { background: var(--fond); }
.maj { color: var(--doux); font-size: .9rem; margin-top: 2rem; }

/* ---------- Publicité ---------- */
.pub { margin: 2rem 0; padding-top: .5rem; border-top: 1px solid var(--trait); min-height: 120px; }
.pub-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #8b91a3; margin: 0 0 .5rem; }
.pub:has(ins[data-ad-status="unfilled"]) { display: none; }

/* ---------- Pied de page ---------- */
.pied { background: #12152a; color: #c8cce0; margin-top: 4rem; padding: 3rem 0 1.5rem; }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.pied h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin: 0 0 .8rem; }
.pied h2:not(:first-child) { margin-top: 1.4rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { padding: .18rem 0; }
.pied a { color: #c8cce0; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.logo-pied, .logo-pied:hover { color: #fff; margin-bottom: .8rem; }
.pied p { font-size: .95rem; }
.pied-bas { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding-top: 1.2rem; font-size: .88rem; color: #8f95b2; }
@media (max-width: 48rem) { .pied-grille { grid-template-columns: 1fr; } }

/* ---------- Mode projection ---------- */
html.tbi-ouvert, html.tbi-ouvert body { overflow: hidden; }
.tbi { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; background: #fff; }
.tbi-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; background: #12152a; color: #fff; }
.tbi-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tbi-barre button { font: 600 .95rem/1 var(--police); color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: .55rem .8rem; cursor: pointer; min-height: 40px; }
.tbi-barre button:hover { background: rgba(255, 255, 255, .2); }
.tbi-barre button[aria-pressed="true"] { background: #fff; color: #12152a; }
.tbi-barre .tbi-encre { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid rgba(255, 255, 255, .35); }
.tbi-barre .tbi-encre.actif { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.tbi-zoom { min-width: 6.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.tbi-fermer { background: var(--corail) !important; border-color: var(--corail) !important; }
.tbi-zone { position: relative; flex: 1; overflow: hidden; }
.tbi-zone canvas { position: absolute; inset: 0; }
.tbi-dessin { cursor: crosshair; touch-action: none; }

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

/* Boutons d'action au-dessus de l'aperçu, visibles sans défiler */
.panneau-apercu { display: flex; flex-direction: column; }
.panneau-apercu .actions { order: -1; margin-bottom: 1rem; }
@media (min-width: 60rem) {
  .panneau-apercu .actions { grid-template-columns: 1.45fr 1fr .8fr 1.45fr; }
  .panneau-apercu .actions .btn:first-child, .panneau-apercu .actions .btn:last-child { grid-column: auto; padding-block: .85rem; font-size: 1rem; }
}
