/* ============================================================
   TURITOTO — services.css
   Cartes de service + volet de configuration (dialog natif).
   S'appuie sur les tokens de style.css.
   ============================================================ */

/* ---- Grille des services ---- */
.svc-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:18px;
  max-width:1100px;margin:0 auto;
}
@media(max-width:980px){.svc-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.svc-grid{grid-template-columns:1fr}}

.svc{
  position:relative;text-align:left;
  background:var(--bg);border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:32px 28px 26px;
  font-family:inherit;color:var(--ink);
  cursor:pointer;
  display:flex;flex-direction:column;gap:9px;
  transition:transform .4s var(--ease),box-shadow .4s var(--ease),border-color .3s;
}
[data-theme="dark"] .svc{background:var(--bg-alt);border-color:#2c2c2e}
.svc:hover{transform:translateY(-4px);box-shadow:0 20px 40px rgba(0,0,0,.08)}
[data-theme="dark"] .svc:hover{box-shadow:0 20px 48px rgba(0,0,0,.55)}
.svc .glyph{width:38px;height:38px;color:var(--ink);margin-bottom:6px}
.svc .glyph svg{width:100%;height:100%;stroke-width:1.3}
.svc h3{font-size:21px;font-weight:600;letter-spacing:-.015em}
.svc p{font-size:14px;line-height:1.45;color:var(--ink-2);letter-spacing:-.01em}
.svc .go{
  margin-top:auto;padding-top:14px;
  font-size:14px;color:var(--link);
  display:inline-flex;align-items:center;gap:2px;
}
.svc .go::after{content:"›";font-size:1.15em;margin-left:3px;transition:transform .25s var(--ease)}
.svc:hover .go::after{transform:translateX(2px)}

.svc-note{
  max-width:620px;margin:40px auto 0;text-align:center;
  font-size:13px;line-height:1.5;color:var(--ink-2);letter-spacing:-.005em;
}

/* ---- Volet de configuration ---- */
dialog.sheet{
  border:none;padding:0;background:transparent;
  max-width:820px;width:calc(100% - 28px);
  max-height:92vh;
  color:var(--ink);
}
dialog.sheet::backdrop{background:rgba(0,0,0,.42);backdrop-filter:blur(3px)}
.sheet-inner{
  background:var(--bg);border-radius:20px;overflow:hidden;
  max-height:92vh;display:flex;flex-direction:column;
}
[data-theme="dark"] .sheet-inner{background:#1c1c1e}
.sheet-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  padding:26px 28px 18px;border-bottom:1px solid var(--hairline);
}
.sheet-head h2{font-size:24px;font-weight:600;letter-spacing:-.018em}
.sheet-head p{font-size:14px;color:var(--ink-2);margin-top:4px;letter-spacing:-.01em}
.sheet-close{
  flex:none;width:30px;height:30px;border-radius:50%;border:none;cursor:pointer;
  background:var(--bg-alt);color:var(--ink-2);font-size:16px;line-height:1;
  font-family:inherit;transition:background .2s,color .2s;
}
[data-theme="dark"] .sheet-close{background:#2c2c2e}
.sheet-close:hover{background:var(--hairline);color:var(--ink)}
.sheet-body{padding:22px 28px 10px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.sheet-foot{
  padding:16px 28px 24px;border-top:1px solid var(--hairline);
  background:var(--bg);
}
[data-theme="dark"] .sheet-foot{background:#1c1c1e}

/* ---- Champs ---- */
.fld{margin-bottom:18px}
.fld>label{
  display:block;font-size:12px;font-weight:600;color:var(--ink-2);
  letter-spacing:-.005em;margin-bottom:7px;
}
.fld input,.fld select,.fld textarea{
  width:100%;font-family:inherit;font-size:17px;letter-spacing:-.022em;
  color:var(--ink);background:var(--bg-alt);
  border:1px solid transparent;border-radius:12px;
  padding:12px 15px;outline:none;
  transition:border-color .2s,box-shadow .2s,background .2s;
  -webkit-appearance:none;appearance:none;
}
[data-theme="dark"] .fld input,[data-theme="dark"] .fld select,[data-theme="dark"] .fld textarea{background:#2c2c2e}
.fld input:focus,.fld select:focus,.fld textarea:focus{
  border-color:var(--blue);box-shadow:0 0 0 3.5px rgba(0,113,227,.18);
}
.fld select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
  padding-right:40px;cursor:pointer;
}
.fld textarea{min-height:110px;resize:vertical;line-height:1.5}
.fld-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:560px){.fld-2{grid-template-columns:1fr}}

/* cases multiples façon pilules */
.opts{display:flex;flex-wrap:wrap;gap:8px}
.opt{position:relative}
.opt input{position:absolute;opacity:0;width:0;height:0}
.opt span{
  display:inline-block;font-size:14px;letter-spacing:-.01em;
  border:1px solid var(--hairline);border-radius:980px;
  padding:8px 16px;cursor:pointer;
  transition:all .2s var(--ease);
}
.opt input:checked+span{background:var(--blue);border-color:var(--blue);color:#fff}
.opt input:focus-visible+span{outline:2px solid var(--blue);outline-offset:3px}

.sep{height:1px;background:var(--hairline);margin:24px 0 20px}
.sec-mini{
  font-size:12px;font-weight:600;color:var(--ink-2);
  letter-spacing:.02em;text-transform:uppercase;margin-bottom:14px;
}
.hp{position:absolute;left:-9999px;opacity:0;height:0;overflow:hidden}

.sheet-foot .btn{width:100%;border:none;cursor:pointer;font-family:inherit}
.btn[disabled]{opacity:.5;cursor:default}
.sheet-note{text-align:center;font-size:12px;color:var(--ink-2);margin-top:12px;letter-spacing:-.005em}
.sheet-status{
  display:none;text-align:center;font-size:15px;letter-spacing:-.01em;
  border-radius:12px;padding:14px 16px;margin-bottom:14px;
}
.sheet-status.ok{display:block;background:rgba(52,199,89,.12);color:#1a7f37}
[data-theme="dark"] .sheet-status.ok{color:#30d158}
.sheet-status.err{display:block;background:rgba(255,59,48,.1);color:#c0271d}
[data-theme="dark"] .sheet-status.err{color:#ff6961}
.sheet-status b{display:block;font-size:19px;font-weight:600;margin-top:6px;letter-spacing:-.015em}

/* ---- Volet : plus large sur grand écran, plein écran sur mobile ---- */
.sheet-body .fld-2{gap:16px}
@media(min-width:760px){
  .sheet-body{padding:26px 34px 14px}
  .sheet-head{padding:30px 34px 20px}
  .sheet-foot{padding:18px 34px 26px}
  .sheet-body .flds{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
}
@media(max-width:600px){
  dialog.sheet{width:100%;max-width:100%;max-height:100vh;margin:0 auto auto;align-self:flex-end}
  .sheet-inner{border-radius:20px 20px 0 0;max-height:94vh}
}

/* ============================================================
   Volet v14 : plus détaillé, plus jamais coupé
   - hauteur basée sur la zone visible réelle (dvh) : sur iPhone,
     la barre de Safari ne masque plus le bouton d'envoi
   - seul le corps défile ; en-tête et pied restent visibles
   ============================================================ */
dialog.sheet{max-height:none;height:auto;overflow:visible;margin:auto}
.sheet-inner{max-height:92vh;max-height:92dvh}
.sheet-head,.sheet-foot{flex:none}
.sheet-body{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
.sheet-head{align-items:center}
.sheet-glyph{flex:none;width:40px;height:40px;color:var(--ink)}
.sheet-glyph svg{width:100%;height:100%;stroke-width:1.3}
.sheet-title{flex:1;min-width:0}
.sheet-foot{padding-bottom:max(18px,env(safe-area-inset-bottom))}
.sheet-note{margin-top:8px}

/* bloc « le service en détail » */
.svc-desc{font-size:16px;line-height:1.55;letter-spacing:-.012em;color:var(--ink);margin-bottom:20px}
.svc-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px 30px}
@media(max-width:640px){.svc-cols{grid-template-columns:1fr}}
.svc-more h4{font-size:14px;font-weight:600;letter-spacing:-.01em;margin:0 0 10px}
.svc-more h4+p,.svc-more ul+h4,.svc-more ol+h4{margin-top:16px}
.svc-incl,.svc-steps{list-style:none;margin:0;padding:0}
.svc-incl li,.svc-steps li{position:relative;font-size:14px;line-height:1.45;color:var(--ink-2);padding-left:26px;margin-bottom:9px;letter-spacing:-.01em}
.svc-incl li::before{
  content:"";position:absolute;left:2px;top:3px;width:14px;height:14px;border-radius:50%;
  background:var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.svc-steps{counter-reset:st}
.svc-steps li{counter-increment:st}
.svc-steps li::before{
  content:counter(st);position:absolute;left:0;top:1px;width:18px;height:18px;border-radius:50%;
  border:1px solid var(--hairline);font-size:11px;font-weight:600;line-height:16px;text-align:center;color:var(--ink);
}
.svc-who{font-size:14px;line-height:1.45;color:var(--ink-2)}
.fld-hint{font-size:12.5px;line-height:1.45;color:var(--ink-2);margin-top:6px;letter-spacing:-.005em}

/* mobile : volet en bas, pleine largeur, sans débordement */
@media(max-width:600px){
  dialog.sheet{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:100%}
  .sheet-inner{max-height:94vh;max-height:94dvh;border-radius:20px 20px 0 0}
  .sheet-head{padding:18px 18px 14px;gap:12px}
  .sheet-glyph{width:32px;height:32px}
  .sheet-head h2{font-size:20px}
  .sheet-head p{font-size:13px}
  .sheet-body{padding:18px 18px 6px}
  .sheet-foot{padding:12px 18px max(14px,env(safe-area-inset-bottom))}
  .sheet-note{font-size:11px}
  .fld input,.fld select,.fld textarea{font-size:16px}
}

/* ============================================================
   Ouverture / fermeture animées du volet
   ============================================================ */
html.sheet-open{overflow:hidden}
dialog.sheet::backdrop{background:rgba(0,0,0,.28);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
dialog.sheet[open]{animation:sheetIn .42s cubic-bezier(.2,.9,.25,1)}
dialog.sheet[open]::backdrop{animation:sheetFade .35s ease}
dialog.sheet.closing{animation:sheetOut .26s ease forwards}
dialog.sheet.closing::backdrop{animation:sheetFadeOut .26s ease forwards}
@keyframes sheetIn{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}
@keyframes sheetOut{to{opacity:0;transform:translateY(12px) scale(.98)}}
@keyframes sheetFade{from{opacity:0}to{opacity:1}}
@keyframes sheetFadeOut{from{opacity:1}to{opacity:0}}
.sheet-inner{transition:transform .3s cubic-bezier(.2,.9,.25,1)}

/* téléphone : feuille qui monte depuis le bas, avec poignée */
@media(max-width:600px){
  dialog.sheet[open]{animation:sheetUp .45s cubic-bezier(.2,.9,.25,1)}
  dialog.sheet.closing{animation:sheetDown .28s cubic-bezier(.4,0,1,1) forwards}
  @keyframes sheetUp{from{transform:translateY(100%)}to{transform:none}}
  @keyframes sheetDown{to{transform:translateY(100%)}}
  .sheet-head{position:relative;padding-top:24px}
  .sheet-head::before{
    content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);
    width:38px;height:5px;border-radius:3px;background:var(--hairline);
  }
}
@media (prefers-reduced-motion: reduce){
  dialog.sheet[open],dialog.sheet.closing,dialog.sheet[open]::backdrop,dialog.sheet.closing::backdrop{animation:none}
}
