/* sections : styles de la refonte (fichier propre à une zone, chargé après styles.css)
   Le squelette de la page : fond de chaque section, formes de passage (dôme, feuilles qui montent,
   vague), motifs légers et reflets. L'intérieur des sections reste dans les autres fichiers.
   Rythme de haut en bas :
     hero blanc → dôme rose (courbe pleine au repos, s'aplatit au défilement)
     → feuille de nuit aux grands coins arrondis (preuves) → feuille blanche (projets)
     → vague rose pâle (méthode, post-its en motif) → arc blanc qui remonte (offres)
     → feuille lilas quadrillée (F4llen) → feuille de nuit (à propos) → feuille blanche (CV, FAQ)
     → feuille de ciel (appel final) → pied de page rose.
   Quand une feuille monte, la section d'avant recule un peu (parallaxe, js/sections.js). */

/* les valeurs animées du dôme ne se transmettent pas aux enfants (moins de recalculs au défilement) */
@property --dome-d{syntax:"<length>";inherits:false;initial-value:0px}
@property --dome-k{syntax:"<number>";inherits:false;initial-value:1}

:root{
  --dome:clamp(48px,7.5vw,150px);   /* flèche du dôme rose au repos */
  --sr:clamp(28px,4.6vw,84px);       /* rayon des feuilles qui montent sur la section d'avant */
  --fbw:100vw;                       /* pleine largeur, sans la barre de défilement (corrigée par js/sections.js) */
  /* motifs : étoiles sur la nuit, quadrillage de spécimen sur le lilas, post-its sur le rose pâle */
  --pat-night:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='%23fff'%3E%3Cpath fill-opacity='.1' d='M42 30c1.1 5.4 3.5 7.9 9 9-5.5 1.1-7.9 3.6-9 9-1.1-5.4-3.5-7.9-9-9 5.5-1.1 7.9-3.6 9-9z'/%3E%3Cpath fill-opacity='.07' d='M134 110c.8 3.8 2.4 5.5 6.2 6.2-3.8.8-5.4 2.4-6.2 6.2-.8-3.8-2.4-5.4-6.2-6.2 3.8-.7 5.4-2.4 6.2-6.2z'/%3E%3Ccircle fill-opacity='.16' cx='118' cy='36' r='1.3'/%3E%3Ccircle fill-opacity='.1' cx='24' cy='126' r='1.7'/%3E%3Ccircle fill-opacity='.13' cx='82' cy='90' r='1'/%3E%3Ccircle fill-opacity='.08' cx='160' cy='164' r='1.3'/%3E%3Ccircle fill-opacity='.1' cx='66' cy='158' r='.9'/%3E%3Crect fill-opacity='.05' x='150' y='40' width='11' height='11' rx='2' transform='rotate(16 155.5 45.5)'/%3E%3C/g%3E%3C/svg%3E");
  --pat-grid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M.5 44V.5H44' fill='none' stroke='%23A445E6' stroke-opacity='.11'/%3E%3C/svg%3E");
  --pat-postit:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23FF4FB8'%3E%3Crect fill-opacity='.09' x='24' y='26' width='16' height='16' rx='3' transform='rotate(-12 32 34)'/%3E%3Cpath fill-opacity='.11' d='M118 94c1 4.8 3.1 7 8 8-4.9 1-7 3.2-8 8-1-4.8-3.1-7-8-8 4.9-1 7-3.2 8-8z'/%3E%3Ccircle fill-opacity='.16' cx='96' cy='30' r='2'/%3E%3Ccircle fill-opacity='.11' cx='40' cy='128' r='1.6'/%3E%3Ccircle fill-opacity='.13' cx='146' cy='150' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}

/* ordre d'empilement : chaque section passe au-dessus de la précédente (le crayon reste à 30, au-dessus de tout) */
.hero{z-index:1}
.proof{z-index:6}
.work{z-index:7}
.method{z-index:8}
.offers{z-index:9}
.fontsec{z-index:10}
.about{z-index:11}
.cvsec{z-index:12}
.faq{z-index:13}
.cta{z-index:14}

/* =========================================================
   HERO : Kuroro passe devant le bas du titre, le dôme rose cache le bas du buste
   --ch = hauteur de Kuroro, --hide = part du buste sous le sommet du dôme,
   --hpb = marge sous Kuroro (le dôme recouvre le bas du hero sur --dome)
   ========================================================= */
.hero{
  --hide:.12;
  --hpt:clamp(86px,12svh,120px);
  --hc:430px;   /* bas des textes au-dessus de Kuroro (téléphone, tablette) : mesuré par js/sections.js */
  --ch:clamp(250px,calc((100svh - var(--hc) - 12px - var(--dome)) / (1 - var(--hide))),min(560px,115vw));
  --hpb:calc(var(--dome) - var(--ch) * var(--hide));
  padding:var(--hpt) var(--pad) var(--hpb);
}
/* lueur rose au ras du dôme, comme si la section rose éclairait le bas du hero */
.hero::after{content:"";position:absolute;z-index:-1;left:-10%;right:-10%;bottom:0;height:46%;background:radial-gradient(50% 62% at 50% 100%,rgba(255,79,184,.16),rgba(255,79,184,0) 72%);pointer-events:none}
.hero__title{font-size:clamp(34px,11vw,124px)}
.hero__intro{margin-top:clamp(16px,2.6svh,28px);gap:12px}
.hero__lead{font-size:clamp(15px,4vw,17px)}
.hero__ctas{width:100%;max-width:460px;margin-top:18px}
.hero__ctas .btn{flex:1 1 150px;padding:18px 18px;font-size:16px}
.hero__char{height:var(--ch);padding-top:0;-webkit-mask-image:linear-gradient(#000 calc((1 - var(--hide)) * 100% + 1%),transparent 99%);mask-image:linear-gradient(#000 calc((1 - var(--hide)) * 100% + 1%),transparent 99%)}
.hero__rings{bottom:calc(var(--hpb) + var(--ch) * .64)}
.hero__sticker{left:auto;right:max(var(--pad),calc(50% - var(--ch) * .47));bottom:calc(var(--hpb) + var(--ch) * .3)}

@media (min-width:1024px){
  .hero{
    --hide:.14;
    --hh:max(100svh,620px);
    --hfs:clamp(76px,min(9.4vw,17.5svh),164px);
    --hpt:clamp(92px,12svh,140px);
    /* le haut de Kuroro chevauche le bas du titre (0,42 × la taille du titre) */
    --ch:clamp(300px,calc((var(--hh) - var(--dome) - var(--hpt) - 1.34 * var(--hfs)) / (1 - var(--hide))),min(820px,40vw));
    --cw:calc(var(--ch) * 560 / 752);
    --mid:calc(var(--hpb) + var(--ch) * .46);   /* hauteur du visage et du cou de Kuroro, depuis le bas */
    --side:calc(50% - var(--cw) / 2 - var(--pad) - clamp(28px,2.6vw,48px));   /* place libre à côté de Kuroro */
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    height:var(--hh);min-height:0;
    padding:var(--hpt) var(--pad) 0;
  }
  .hero__title{grid-column:1;grid-row:1;align-self:start;font-size:var(--hfs)}
  /* Kuroro devant le titre, comme une couverture de magazine */
  .hero__char{grid-column:1;grid-row:1 / -1;justify-self:center;align-self:end;margin:0 0 var(--hpb)}
  /* de part et d'autre de Kuroro, centrés à hauteur de son visage : à gauche qui (pastille, phrase),
     à droite les deux boutons, empilés et de même largeur */
  .hero__intro{position:absolute;left:var(--pad);right:auto;bottom:var(--mid);translate:0 50%;justify-items:start;gap:clamp(16px,1.5vw,22px);width:min(clamp(340px,27vw,510px),var(--side));max-width:none;margin:0;text-align:left}
  .hero__intro .badge{font-size:clamp(13.5px,1.02vw,16px);padding:.72em 1.15em}
  .hero__lead{max-width:none;font-size:clamp(17px,1.32vw,21px);line-height:1.5}
  .hero__ctas{position:absolute;left:auto;right:var(--pad);bottom:var(--mid);translate:0 50%;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:14px;width:auto;max-width:var(--side);margin:0}
  .hero__ctas .btn{flex:0 0 auto;padding:clamp(19px,1.5vw,25px) clamp(28px,2.5vw,44px);font-size:clamp(17px,1.25vw,20px)}
  /* l'étiquette collée sur la joue de Kuroro ; l'invitation à défiler tout à droite, au ras du dôme */
  .hero__sticker{left:calc(50% + var(--cw) * .27);right:auto;bottom:calc(var(--hpb) + var(--ch) * .5)}
  .hero__scroll{top:auto;right:var(--pad);bottom:calc(var(--dome) * .3)}
}
/* petits écrans d'ordinateur : l'étiquette descend sur le sweat pour laisser la place aux boutons */
@media (min-width:1024px) and (max-width:1279px){
  .hero__sticker{left:calc(50% + var(--cw) * .12);bottom:calc(var(--hpb) + var(--ch) * .2)}
  .hero__ctas .btn{padding:17px 24px;font-size:16px}
  .hero__scroll{display:none}
}

/* =========================================================
   1. hero → le problème : dôme rose
   La courbe est une parabole qui touche les bords en biais (plus douce qu'une demi-ellipse) ;
   motion.js fait passer --dome-d de --dome à 0 au défilement. Trois filets clairs suivent le bord,
   en écho aux cercles du hero.
   ========================================================= */
.problem{
  --dome-d:var(--dome);
  margin-top:calc(-1 * var(--dome));
  padding-top:calc(var(--dome) + clamp(30px,5vw,70px));
  clip-path:inset(0 round 50% 50% 0 0 / var(--dome-d) var(--dome-d) 0 0);
}
@supports (clip-path:shape(from 0 0,line to 1px 1px)){
  .problem{clip-path:shape(from 0 var(--dome-d),curve to 50% 0 with 16.667% calc(var(--dome-d) / 3) / 33.333% 0,curve to 100% var(--dome-d) with 66.667% 0 / 83.333% calc(var(--dome-d) / 3),line to 100% 100%,line to 0 100%,close)}
}
.problem::before{
  --dome-d:inherit;--dome-k:inherit;
  content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--dome) + 80px);pointer-events:none;opacity:var(--dome-k);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -2 1000 102' preserveAspectRatio='none'%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpath d='M0 100C166.7 33.3 333.3 0 500 0S833.3 33.3 1000 100' fill='none' stroke='url(%23g)' stroke-opacity='.7' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 7px/100% calc(var(--dome-d) * 1.02 + 2px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -2 1000 102' preserveAspectRatio='none'%3E%3ClinearGradient id='g'%3E%3Cstop offset='.08' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23fff'/%3E%3Cstop offset='.92' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpath d='M0 100C166.7 33.3 333.3 0 500 0S833.3 33.3 1000 100' fill='none' stroke='url(%23g)' stroke-opacity='.38' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 22px/100% calc(var(--dome-d) * 1.02 + 2px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -2 1000 102' preserveAspectRatio='none'%3E%3ClinearGradient id='g'%3E%3Cstop offset='.18' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23fff'/%3E%3Cstop offset='.82' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpath d='M0 100C166.7 33.3 333.3 0 500 0S833.3 33.3 1000 100' fill='none' stroke='url(%23g)' stroke-opacity='.2' stroke-width='1.2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 42px/100% calc(var(--dome-d) * 1.02 + 2px) no-repeat;
}

/* =========================================================
   Feuilles : la section monte sur la précédente avec de grands coins arrondis
   ========================================================= */
.sheet{margin-top:calc(-1 * var(--sr));border-radius:var(--sr) var(--sr) 0 0}

/* --- nuit (preuves, à propos) : étoiles très discrètes, halo violet en haut, liseré clair sur le bord --- */
.sheet--night{
  padding-top:calc(var(--sec) + var(--sr) * .4);
  background:radial-gradient(45% 40% at 100% 100%,rgba(255,79,184,.12),rgba(255,79,184,0) 70%),var(--pat-night) 0 0/180px 180px,var(--night);
  box-shadow:0 -26px 60px -30px rgba(26,13,42,.55);
}
.sheet--night::before{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--sr) + clamp(60px,9vw,150px));border-radius:inherit;background:radial-gradient(50% 100% at 50% 0%,rgba(164,69,230,.3),rgba(164,69,230,0) 72%);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.15);pointer-events:none}

/* --- blanches (projets, CV) et lilas (F4llen) : la section garde sa largeur de lecture,
       le fond pleine largeur est un pseudo-élément --- */
.sheet--white,.sheet--lilac{isolation:isolate}
.sheet--white::before,.sheet--lilac::before,.faq::before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:calc(50% - var(--fbw) / 2);width:var(--fbw);pointer-events:none}
.sheet--white::before{border-radius:var(--sr) var(--sr) 0 0;background:var(--white)}
.sheet--white{padding-top:calc(var(--sec) + var(--sr) * .3)}

.sheet--lilac{padding-top:calc(var(--sr) + clamp(44px,5.5vw,96px))}
.sheet--lilac::before{
  border-radius:var(--sr) var(--sr) 0 0;
  background:radial-gradient(58% 46% at 50% 48%,rgba(255,255,255,.92),rgba(255,255,255,0) 72%),radial-gradient(40% 40% at 0% 0%,rgba(255,79,184,.1),rgba(255,79,184,0) 70%),var(--pat-grid) center top/44px 44px,#F7F0FF;
  box-shadow:0 -26px 60px -34px rgba(164,69,230,.4);
}

/* --- ciel (appel final) --- */
.sheet--sky{box-shadow:0 -26px 70px -34px rgba(122,20,98,.4)}

/* =========================================================
   projets → méthode : une vague rose pâle au bas des projets, la méthode continue dans ce rose
   méthode → offres : un arc blanc remonte au bas de la méthode (écho au premier dôme)
   ========================================================= */
.work::after{content:"";position:absolute;z-index:-1;bottom:-1px;left:calc(50% - var(--fbw) / 2);width:var(--fbw);height:clamp(40px,6vw,110px);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath fill='%23FFEDF6' d='M0 58C240 106 470 10 760 36s480 66 680 6V100H0z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;pointer-events:none}
.method{isolation:isolate;background:linear-gradient(#FFEDF6,#FFE3F1 52%,#FFE9F4)}
/* post-its et étincelles, qui apparaissent sous la vague et s'effacent avant l'arc */
.method::before{content:"";position:absolute;z-index:-1;inset:0;background:var(--pat-postit) 0 0/160px 160px;-webkit-mask-image:linear-gradient(transparent,#000 22%,#000 78%,transparent);mask-image:linear-gradient(transparent,#000 22%,#000 78%,transparent);pointer-events:none}
.method::after{content:"";position:absolute;z-index:-1;left:0;right:0;bottom:-1px;height:clamp(40px,6.5vw,120px);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 100C166.7 33.3 333.3 0 500 0S833.3 33.3 1000 100z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;pointer-events:none}

/* FAQ : une lueur lilas très douce, qui annonce le ciel de l'appel final */
.faq{isolation:isolate}
.faq::before{background:radial-gradient(40% 46% at 8% 22%,rgba(255,79,184,.07),rgba(255,79,184,0) 70%),radial-gradient(50% 50% at 92% 100%,rgba(164,69,230,.09),rgba(164,69,230,0) 70%)}
