/* RATTIB · accueil : le site est un bloc de papier. S'ajoute à douceur.css */
:root { --haut: 61px; --fibres: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8 .3' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23f)'/%3E%3C/svg%3E"); }
html { scroll-padding-top: calc(var(--haut) + 12px); }
body { background: var(--creme) var(--fibres); }
h1, h2 { text-wrap: balance; }
.main { font-family: var(--main); color: var(--stylo); font-weight: 500; }

/* En-tête : le logo, deux liens, la langue */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--creme) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.top .wrap { min-height: 60px; gap: 16px; }
.top nav { display: flex; align-items: center; gap: 22px; font-weight: 500; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.top .nav-lien { display: none; }

/* L'ouverture : les trois blocs posés dans l'arc, à leur vraie échelle */
.ouverture { overflow: clip; }
.ouverture-in { display: grid; gap: 26px; padding-block: 30px 46px; }
.ouverture-txt { text-align: center; }
.ouverture-txt .main { display: block; font-size: 24px; line-height: 1.1; }
.ouverture-txt h1 { margin-top: 8px; font-size: clamp(40px, 11.4vw, 82px); }
.ouverture-txt h1 em { position: relative; font-style: normal; white-space: nowrap; }
.ouverture-txt h1 em svg { position: absolute; inset: auto 0 -.16em; width: 100%; height: .2em; overflow: visible; color: var(--terre); }
.ouverture-txt p { max-width: 30em; margin: 16px auto 0; font-size: 18px; color: var(--brun-doux); }
.ouverture-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.ouverture-cta .btn { flex: 1 1 150px; padding-inline: 14px; white-space: nowrap; }
.pose-planning .pose-nom { order: -1; justify-self: start; margin-inline-start: 6%; }
/* En arabe aussi l'étiquette reste à gauche, loin du médaillon au sommet de l'arc */
[dir="rtl"] .pose-planning .pose-nom { justify-self: end; margin-inline: 0 6%; }

.nature { position: relative; width: min(100%, 520px); aspect-ratio: 1 / .92; margin-inline: auto; }
.nature-arc { position: absolute; inset: 8% 6% 0; border-radius: 999px 999px 24px 24px; background: var(--terre-pale); }
/* La clé de l'arc : le logo dans un médaillon, et son ombre géante en filigrane derrière les blocs */
.nature-arc .cle { position: absolute; top: -34px; left: 50%; width: 68px; height: 68px; margin-left: -34px; border-color: var(--terre); background: var(--creme); box-shadow: 0 0 0 6px var(--creme); color: var(--terre-fonce); }
.nature-arc .cle .embleme { width: 44px; height: 44px; }
.nature-arc .filigrane { position: absolute; top: 10%; left: 50%; width: 78%; height: auto; transform: translateX(-50%); color: var(--terre); opacity: .22; }
.nature-arc .filigrane.vu g path { animation-duration: 3.2s; }
/* Les largeurs suivent la vraie échelle : 29,7 cm, 14,8 cm, 10 cm */
.pose { position: absolute; display: grid; justify-items: center; gap: 8px; color: var(--brun); text-decoration: none; transform: translate(var(--px, 0), var(--py, 0)) rotate(var(--r)); transition: transform 380ms var(--courbe); }
.pose-planning { --r: -5deg; left: 4%; top: 12%; width: 74%; }
.pose-semaine { --r: 4deg; right: 3%; top: 31%; width: 37%; }
.pose-liste { --r: -3deg; left: 10%; top: 45%; width: 25%; }
.pose-bloc { display: block; width: 100%; filter: drop-shadow(0 12px 14px rgba(53, 38, 27, .22)); transition: filter 380ms var(--courbe), transform 380ms var(--courbe); }
.pose-gum { display: block; height: 7px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #45302A, var(--brun)); }
.pose img, .pose .couv { display: block; width: 100%; height: auto; }
.pose-tranche { display: block; height: 4px; border-radius: 0 0 3px 3px; background: repeating-linear-gradient(180deg, #FBF7EF 0 1px, #E3D6C3 1px 2px); }
.pose-nom { padding: 3px 11px; border-radius: 999px; background: var(--papier); box-shadow: 0 2px 8px -3px rgba(53, 38, 27, .35); font: 600 15px/1.3 var(--titres); white-space: nowrap; }
.pose:hover .pose-bloc, .pose:focus-visible .pose-bloc { transform: translateY(-8px); filter: drop-shadow(0 22px 22px rgba(53, 38, 27, .3)); }
.pose:focus-visible { outline: none; }
.pose:focus-visible .pose-nom { outline: 3px solid var(--stylo); outline-offset: 2px; }

/* À l'ouverture, les blocs se posent un par un */
@media (prefers-reduced-motion: no-preference) {
  .pose { animation: pose 900ms var(--courbe) both; animation-delay: calc(250ms + var(--i) * 140ms); }
  @keyframes pose { from { opacity: 0; transform: translateY(-34px) rotate(calc(var(--r) * 2.4)); } }
  .ouverture-txt > * { animation: monte 640ms var(--courbe) both; }
  .ouverture-txt > :nth-child(2) { animation-delay: 80ms; }
  .ouverture-txt > :nth-child(3) { animation-delay: 160ms; }
  .ouverture-txt > :nth-child(4) { animation-delay: 240ms; }
  @keyframes monte { from { opacity: 0; transform: translateY(12px); } }
}

/* Sections */
.section { padding-block: clamp(60px, 11vw, 104px); }
.titre-doux { margin-top: 12px; max-width: 34em; color: var(--brun-doux); font-size: 18px; }

/* Les blocs à leur vraie échelle */
.echelle { --mm: calc(min(100vw - 64px, 660px) / 458); display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-top: 34px; padding-bottom: 8px; border-bottom: 2px solid var(--brun); }
.pad { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pad-feuille { position: relative; width: calc(var(--w) * var(--mm)); height: calc(var(--h) * var(--mm)); overflow: hidden; border-radius: 2px 2px 7px 7px; background: var(--papier); box-shadow: 0 10px 20px -10px rgba(53, 38, 27, .4), 2px 3px 0 var(--ligne), 4px 6px 0 var(--ligne); }
.pad-feuille::before { content: ""; position: absolute; inset: 0 0 auto; height: 6%; background: var(--t); }
.pad-feuille .rosette { position: absolute; top: 16%; left: 50%; width: 30%; height: auto; aspect-ratio: 1; transform: translateX(-50%); }
.pad-feuille::after { content: ""; position: absolute; inset: 48% 14% 8%; background: repeating-linear-gradient(var(--ligne) 0 2px, transparent 2px 11%); filter: blur(.6px); }
.pad b { font: 600 18px/1.1 var(--titres); text-align: center; }
.pad small { font-size: 16px; color: var(--brun-doux); white-space: nowrap; }
.cartes { margin-top: 30px; }
.carte h3 { font-size: 30px; }

/* Comment ça marche : tracé au stylo */
.etapes { display: grid; gap: 34px; margin-top: 34px; }
.etape svg { width: 100%; max-width: 340px; height: auto; }
.trait { fill: none; stroke: var(--stylo); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.etape .jour-main { display: block; margin-top: 6px; font-size: 32px; line-height: 1.1; }
.etape p { margin-top: 4px; }

/* Le Duo */
.duo-arc { display: grid; gap: 22px; padding: 56px 24px 30px; border-radius: 999px 999px 22px 22px; background: var(--t-pale); text-align: center; }
.duo-arc .rosette { margin-inline: auto; }
.duo-arc .btn { justify-self: center; }

/* Le quiz */
.quiz { margin-top: 26px; padding: 22px; border: 1px solid var(--ligne); border-radius: 18px; background: var(--papier); box-shadow: var(--ombre); }
.q { display: grid; gap: 16px; }
.q h3 { font-size: 30px; }
.q-rep { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-rep .btn { width: 100%; }
.reco-nom { display: block; margin-top: 2px; font-size: 44px; line-height: 1.05; }
.reco .btn { margin-top: 18px; width: 100%; }
.refaire { min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--brun-doux); font: 500 16px var(--texte); text-decoration: underline; cursor: pointer; }

/* Questions */
.faq { margin-top: 22px; }
.faq details { border-bottom: 1px solid var(--ligne); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding-block: 10px; font: 600 23px/1.2 var(--titres); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border: 1.5px solid var(--t-fonce); transform: rotate(45deg); transition: background 200ms; }
.faq details[open] summary::after { background: var(--stylo); border-color: var(--stylo); }
.faq details p { padding-bottom: 18px; }

/* La fin : le bilan du dimanche, et ton mot */
.bilan { text-align: center; }
.bilan .main { display: block; margin-block: 8px 20px; font-size: clamp(38px, 11vw, 60px); line-height: 1.05; }
.bilan .btn { min-width: min(100%, 320px); }
.bilan-ligne { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; font: 600 20px/1.2 var(--titres); }
.bilan-ligne i { width: 11px; height: 11px; background: var(--stylo); transform: rotate(45deg); }
.pied .wrap { display: grid; gap: 8px; }
.pied a { display: inline-flex; align-items: center; min-height: 44px; }

/* WhatsApp flottant : apparaît dès que le numéro est renseigné */
.wa-flottant { position: fixed; inset-inline-end: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; box-shadow: var(--ombre); }

/* Apparitions */
.js .monte { opacity: 0; transform: translateY(12px); transition: opacity 420ms var(--courbe), transform 420ms var(--courbe); }
.js .monte.vu { opacity: 1; transform: none; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .trait { stroke-dasharray: 1; animation: ecrit linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    @keyframes ecrit { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .monte { opacity: 1; transform: none; transition: none; }
  .pose, .pose-bloc { transition: none; }
}
@media (min-width: 720px) {
  .etapes { grid-template-columns: repeat(3, 1fr); }
  .duo-arc { padding: 72px 12% 40px; }
}
@media (min-width: 720px) { .top .nav-lien { display: inline-flex; } }
@media (min-width: 900px) {
  .ouverture-in { grid-template-columns: 1fr 1.05fr; align-items: center; min-height: calc(100svh - 61px); padding-block: 40px; }
  .ouverture-txt { text-align: start; }
  .ouverture-txt h1 { font-size: min(5.8vw, 10svh, 84px); }
  .ouverture-txt p { margin-inline: 0; font-size: 20px; }
  .ouverture-cta { justify-content: flex-start; }
  .ouverture-cta .btn { flex: 0 0 auto; }
  .nature { width: 100%; }
  .pose-nom { font-size: 17px; }
}

/* Comment ça marche : trois moments, le besoin et le bloc qui y répond */
.surtitre { display: block; margin-bottom: 6px; font-size: 26px; line-height: 1.1; }
.rituel { display: grid; gap: 18px; margin: 30px 0 0; padding: 0; list-style: none; }
.moment-r { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 20px; overflow: hidden; border: 1px solid var(--ligne); border-top: 4px solid var(--t); border-radius: 18px; background: var(--papier); box-shadow: var(--ombre); }
.moment-dessin { margin: 0 -20px 4px; padding: 12px 8px 0; background: var(--creme); }
.moment-dessin svg { display: block; width: 100%; max-width: 380px; height: auto; margin-inline: auto; }
.moment-tete { display: flex; align-items: center; gap: 10px; }
.moment-n { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--t-fonce); color: var(--papier); font: 600 18px/1 var(--titres); }
.moment-quand { font: 600 17px/1.2 var(--titres); color: var(--t-fonce); letter-spacing: .02em; }
.moment-r h3 { font-size: 30px; }
.sans, .avec { display: flex; gap: 10px; font-size: 16.5px; line-height: 1.45; }
.sans { color: var(--brun-doux); }
.signe-r { display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 3px; font-size: 13px; }
.sans .signe-r { color: var(--brun-doux); }
.avec .signe-r::before { content: ""; width: 10px; height: 10px; background: var(--stylo); transform: rotate(45deg); }
.moment-bloc { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: auto; padding: 8px 14px; border-radius: 12px; background: var(--t-pale); font: 600 20px/1.1 var(--titres); text-decoration: none; transition: transform 160ms var(--courbe); }
.moment-bloc:hover { transform: translateX(3px); }
.resultat { display: grid; gap: 16px; justify-items: center; margin-top: 30px; padding: 26px 20px; border-radius: 18px; background: var(--terre-pale); text-align: center; }
.resultat p { max-width: 34em; font-size: 19px; line-height: 1.5; }
.resultat .main { font-size: 28px; }
@media (min-width: 900px) {
  .rituel { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .moment-bloc { transition: none; } }

.economie { font-size: 17px; color: var(--brun-doux); }
.economie:empty { display: none; }
