/* [patch HY] App « Mes pages » (MicroChrono Pro).
   Feuille autonome (le Tailwind du site est purgé : aucune de ses classes ici).
   Idée directrice : les pages du client sont des cartes posées dans un porte-cartes ;
   tout le reste reste calme (blanc, un seul vert, l'ambre pour ce qui attend). */
:root{
  --encre:#12251b; --encre-2:#46594e; --encre-3:#768a7e;
  --fond:#f2f5f3; --surface:#fff; --ligne:#d8e2db; --ligne-2:#e8eeea;
  --vert:#16a34a; --vert-fonce:#0e5c30; --vert-pale:#e2f3e8;
  --ambre:#8a4b00; --ambre-pale:#fff1d1;
  --rouge:#b42318; --rouge-pale:#fde8e6;
  --rayon:16px; --rayon-s:10px;
  --ombre:0 1px 2px rgba(18,37,27,.06),0 10px 28px rgba(18,37,27,.07);
  --police:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --barre-h:56px; --sous-barre-h:52px; --onglets-h:64px;
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
dialog:not([open]){display:none}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--police);font-size:15px;line-height:1.5;color:var(--encre);background:var(--fond);
  padding-bottom:calc(var(--onglets-h) + env(safe-area-inset-bottom));min-height:100vh}
body.sans-onglets{padding-bottom:0}
a{color:var(--vert-fonce)}
img{max-width:100%;display:block}
h1,h2,h3{line-height:1.2;margin:0;letter-spacing:-.01em}
h1{font-size:24px;font-weight:750}
h2{font-size:17px;font-weight:700}
h3{font-size:15px;font-weight:650}
p{margin:0}
:focus-visible{outline:3px solid #7cc79a;outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- Barre du haut [patch IB] : MicroChrono à gauche (retour au site), menu complet à droite ---------- */
.barre{position:sticky;top:0;z-index:30;height:var(--barre-h);display:flex;align-items:center;gap:10px;
  padding:0 8px 0 16px;background:#fff;border-bottom:1px solid var(--ligne-2)}
.barre-logo{display:flex;align-items:center;gap:9px;min-width:0;margin-right:auto;text-decoration:none;color:var(--encre)}
.barre-logo img{flex:none;width:34px;height:34px}
.marque{font-size:20px;font-weight:800;letter-spacing:-.01em;white-space:nowrap}
.marque span{color:var(--vert)}
.barre-actions{display:flex;align-items:center;gap:8px}
.barre-actions:empty{display:none}
.barre-menu{flex:none;width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;
  border-radius:12px;background:none;color:var(--encre-2);cursor:pointer}
.barre-menu:hover{background:var(--fond);color:var(--encre)}
.barre-menu svg{width:26px;height:26px}
@media (max-width:359px){.marque{font-size:18px}.barre-logo img{width:30px;height:30px}}

/* Barre d'un écran (éditeur) : retour, titre, actions. Sur téléphone, seule elle reste en haut quand on descend. */
.sous-barre{position:sticky;top:var(--barre-h);z-index:29;display:flex;align-items:center;gap:8px;min-height:var(--sous-barre-h);
  padding:6px 12px;background:rgba(242,245,243,.94);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);
  border-bottom:1px solid var(--ligne-2)}
.sous-barre-retour{flex:none;padding:0 6px}
.sous-barre-titre{flex:1;min-width:0;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sous-barre-actions{flex:none;display:flex;align-items:center;gap:8px}
@media (max-width:599px){.sous-barre-retour span{display:none}}
@media (max-width:899px){body[data-ecran="editeur"] .barre{position:relative}body[data-ecran="editeur"] .sous-barre{top:0}}
.etat-enreg{font-size:13px;color:var(--encre-3);white-space:nowrap}
.etat-enreg[data-etat="encours"]{color:var(--encre-2)}
.etat-enreg[data-etat="erreur"]{color:var(--rouge);font-weight:600}

/* ---------- Menu complet (l'espace + tout le site) ---------- */
body.menu-ouvert{overflow:hidden}
@media (max-width:1099px){body.apercu-ouvert{overflow:hidden}}
dialog.menu-app{position:fixed;inset:0;margin:0;padding:0;border:0;border-radius:0;width:100%;max-width:none;height:100%;max-height:none;
  background:#fff;color:var(--encre);box-shadow:none;overflow:hidden}
dialog.menu-app::backdrop{background:rgba(13,23,18,.45)}
dialog.menu-app[open]{animation:menu-entree .18s ease-out}
@keyframes menu-entree{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.menu-panneau{height:100%;display:flex;flex-direction:column}
.menu-tete{flex:none;height:var(--barre-h);display:flex;align-items:center;gap:10px;padding:0 8px 0 16px;border-bottom:1px solid var(--ligne-2)}
.menu-tete .barre-menu{background:var(--fond)}
.menu-corps{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px 16px calc(28px + env(safe-area-inset-bottom))}
.menu-titre{margin:0 0 6px;font-size:13px;font-weight:700;color:var(--encre-3)}
.menu-espace{display:flex;flex-direction:column;margin-bottom:20px}
.menu-espace a{position:relative;display:flex;align-items:center;gap:12px;min-height:48px;padding:0 10px;border-radius:12px;
  color:var(--encre);font-weight:600;text-decoration:none}
.menu-espace a svg{flex:none;width:22px;height:22px;color:var(--encre-2)}
.menu-espace a[aria-current="page"]{background:var(--vert-pale);color:var(--vert-fonce);font-weight:700}
.menu-espace a[aria-current="page"] svg{color:var(--vert-fonce)}
.menu-espace .pastille{position:static;margin-left:auto}
.menu-site{display:flex;flex-direction:column;border-top:1px solid var(--ligne-2)}
.menu-site a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:0 10px;
  border-bottom:1px solid var(--ligne-2);color:var(--encre);font-weight:600;text-decoration:none}
.menu-site a svg{flex:none;width:18px;height:18px;color:var(--encre-3)}
.menu-espace a:hover,.menu-site a:hover{background:var(--fond)}
.menu-corps .menu-sortie{margin-top:22px;color:var(--rouge)}
@media (min-width:700px){
  dialog.menu-app{left:auto;width:380px;border-left:1px solid var(--ligne);box-shadow:-24px 0 60px rgba(13,23,18,.18)}
  dialog.menu-app[open]{animation-name:menu-cote}
}
@keyframes menu-cote{from{opacity:0;transform:translateX(28px)}to{opacity:1;transform:none}}

/* ---------- Onglets (bas sur téléphone, à gauche sur ordinateur) ---------- */
.onglets{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;background:var(--surface);
  border-top:1px solid var(--ligne);padding-bottom:env(safe-area-inset-bottom)}
.onglets a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  height:var(--onglets-h);text-decoration:none;color:var(--encre-3);font-size:11.5px;font-weight:600;position:relative}
.onglets a svg{width:24px;height:24px}
.onglets a[aria-current="page"]{color:var(--vert-fonce)}
.onglets a[aria-current="page"]::before{content:"";position:absolute;top:0;left:28%;right:28%;height:3px;border-radius:0 0 3px 3px;background:var(--vert)}
.pastille{position:absolute;top:8px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--rouge);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
@media (min-width:900px){
  body{padding-bottom:0;padding-left:216px}
  body.sans-onglets{padding-left:0}
  .onglets{top:var(--barre-h);bottom:0;right:auto;width:216px;flex-direction:column;justify-content:flex-start;
    padding:16px 12px;border-top:0;border-right:1px solid var(--ligne)}
  .onglets a{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:12px;height:46px;padding:0 14px;
    border-radius:12px;font-size:14.5px}
  .onglets a[aria-current="page"]{background:var(--vert-pale)}
  .onglets a[aria-current="page"]::before{display:none}
  .pastille{position:static;margin-left:auto}
  .barre{padding:0 16px 0 24px}
  body:not(.sans-onglets) .barre{margin-left:-216px}  /* l'en-tête couvre toute la largeur, au-dessus des onglets */
}

/* ---------- Contenu ---------- */
.contenu{max-width:1080px;margin:0 auto;padding:20px 16px 32px}
.entete{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.entete p{color:var(--encre-2);margin-top:4px}
.entete .deja-compte{font-size:14px}
.deja-compte a{font-weight:650}
.bloc{background:var(--surface);border:1px solid var(--ligne-2);border-radius:var(--rayon);padding:18px;box-shadow:var(--ombre)}
.bloc + .bloc{margin-top:14px}
.discret{color:var(--encre-3);font-size:13.5px}
.vide{text-align:center;padding:36px 16px;color:var(--encre-2)}
.vide h2{margin-bottom:6px}

/* ---------- Boutons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:12px;
  border:1px solid transparent;font:inherit;font-weight:650;font-size:15px;cursor:pointer;text-decoration:none;
  background:var(--surface);color:var(--encre);border-color:var(--ligne);transition:background .15s,border-color .15s}
.btn:hover{border-color:#b9c8be}
.btn svg{width:18px;height:18px}
.btn-vert{background:var(--vert);border-color:var(--vert);color:#fff}
.btn-vert:hover{background:#12873d;border-color:#12873d}
.btn-fonce{background:var(--vert-fonce);border-color:var(--vert-fonce);color:#fff}
.btn-texte{background:none;border-color:transparent;color:var(--vert-fonce);padding:0 8px}
.btn-danger{background:var(--rouge);border-color:var(--rouge);color:#fff}
.btn-petit{min-height:36px;padding:0 12px;font-size:14px;border-radius:10px}
.btn-large{width:100%}
.btn[disabled]{opacity:.55;cursor:not-allowed}

/* ---------- Champs ---------- */
.champ{display:block;margin-bottom:14px}
.champ > span{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
.champ small{display:block;color:var(--encre-3);font-size:12.5px;margin-top:5px}
.champ small.erreur{color:var(--rouge);font-weight:600}
input[type=text],input[type=email],input[type=tel],input[type=url],input[type=password],input[type=number],
input[type=time],select,textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--ligne);border-radius:var(--rayon-s);
  background:#fff;color:var(--encre);font:inherit;font-size:16px}
textarea{min-height:110px;resize:vertical;line-height:1.45}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--vert);box-shadow:0 0 0 3px rgba(22,163,74,.18)}
.champ.invalide input,.champ.invalide textarea{border-color:var(--rouge)}
.deux{display:grid;grid-template-columns:1fr;gap:0 14px}
@media (min-width:600px){.deux{grid-template-columns:1fr 1fr}}
.interrupteur{display:flex;align-items:flex-start;gap:12px;padding:10px 0;cursor:pointer}
.interrupteur input{appearance:none;-webkit-appearance:none;flex:0 0 44px;width:44px;height:26px;border-radius:13px;background:#c9d4cd;position:relative;
  cursor:pointer;transition:background .15s;margin:0}
.interrupteur input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .15s}
.interrupteur input:checked{background:var(--vert)}
.interrupteur input:checked::after{transform:translateX(18px)}
.interrupteur b{display:block;font-weight:600}
.interrupteur em{display:block;font-style:normal;color:var(--encre-3);font-size:13px}

/* ---------- Résumé du tableau de bord ; carte de visite de l'écran d'accès (_carte.html) ---------- */
.resume{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}
.resume a{display:flex;flex-direction:column;padding:10px 12px;border-radius:14px;background:var(--surface);
  border:1px solid var(--ligne-2);text-decoration:none;color:var(--encre);min-width:0}
.resume b{font-size:22px;font-weight:750;font-variant-numeric:tabular-nums}
.resume span{font-size:12.5px;line-height:1.3;color:var(--encre-2)}
.carte-pro{position:relative;aspect-ratio:85/55;border-radius:14px;background:#fff;overflow:hidden;
  box-shadow:0 1px 0 rgba(18,37,27,.05),0 14px 30px -12px rgba(18,37,27,.35);
  display:flex;flex-direction:column;justify-content:space-between;padding:18px 18px 16px 30px;color:var(--encre);text-decoration:none}
.carte-pro::before{content:"";position:absolute;left:0;top:0;bottom:0;width:12px;background:var(--c,#16a34a)}
.carte-pro .haut{display:flex;align-items:center;gap:14px;min-width:0}
.carte-pro .av{flex:0 0 58px;width:58px;height:58px;border-radius:50%;background:var(--c,#16a34a);color:#fff;display:flex;align-items:center;
  justify-content:center;font-weight:800;font-size:20px;overflow:hidden}
.carte-pro .av img{width:100%;height:100%;object-fit:cover}
.carte-pro .nom{font-size:18px;font-weight:750;line-height:1.15;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical}
.carte-pro .quoi{color:var(--encre-2);font-size:14px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.carte-pro .coord{display:flex;flex-direction:column;gap:1px;padding-left:72px;font-size:13px;color:var(--encre-2);min-width:0}
.carte-pro .coord span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.carte-pro .bas{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.carte-pro .type{color:var(--encre-3);font-weight:600}
.statut{display:inline-flex;align-items:center;gap:6px;font-weight:650;font-size:12.5px;padding:3px 10px;border-radius:20px}
.statut::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.statut.en-ligne{color:var(--vert-fonce);background:var(--vert-pale)}
.statut.brouillon{color:var(--ambre);background:var(--ambre-pale)}

/* ---------- Onglet Pages [patch IB] : chaque page s'affiche telle quelle (aperçu dessiné selon son type) ---------- */
.pages-grille{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pages-grille > *{min-width:0}
@media (min-width:640px){.pages-grille{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media (min-width:1240px){.pages-grille{grid-template-columns:repeat(4,minmax(0,1fr))}}
.page-carte{display:flex;flex-direction:column;padding:8px;border-radius:var(--rayon);background:var(--surface);border:1px solid var(--ligne-2);
  box-shadow:0 6px 18px rgba(18,37,27,.06)}
.page-scene{--mini-zoom:1;display:flex;align-items:center;justify-content:center;width:100%;height:262px;padding:0;border:0;border-radius:11px;
  overflow:hidden;cursor:zoom-in;font:inherit;background:radial-gradient(120% 90% at 50% 18%,color-mix(in srgb,var(--c) 18%,#fff),color-mix(in srgb,var(--c) 7%,#eef2ef))}
@media (min-width:640px){.page-scene{--mini-zoom:1.14;height:300px}}
@media (max-width:374px){.page-scene,.type-scene{--mini-zoom:.86;height:226px}}
.page-infos{min-width:0;padding:9px 4px 0}
.page-nom{font-size:14.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-type{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin-top:2px;font-size:12.5px;color:var(--encre-2)}
.etat-page{display:inline-flex;align-items:center;gap:5px;font-weight:650}
.etat-page::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.etat-page.en-ligne{color:var(--vert-fonce)}
.etat-page.brouillon{color:var(--ambre)}
.page-messages{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:20px;background:var(--rouge-pale);color:var(--rouge);
  font-size:12px;font-weight:700;text-decoration:none}
.page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:auto;padding-top:9px}  /* boutons alignés en bas de chaque carte */
.page-actions .btn{min-height:38px;padding:0 6px;gap:5px;font-size:13px}
.page-actions .btn svg{flex:none;width:15px;height:15px}
@media (max-width:420px){.page-actions .btn svg{display:none}}  /* petits écrans : le mot seul, sans icône écrasée */
.btn-agrandir{background:var(--vert-pale);border-color:var(--vert-pale);color:var(--vert-fonce)}
.btn-agrandir:hover{border-color:#a9d9b9}
.page-nouvelle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:200px;padding:16px;
  border-radius:var(--rayon);border:2px dashed #b8c7bd;background:rgba(255,255,255,.45);color:var(--vert-fonce);font-weight:650;
  text-align:center;text-decoration:none}
.page-nouvelle svg{width:30px;height:30px}

/* ---------- [patch IE] Mes pages : un titre par type, appui long pour supprimer, limite de pages ---------- */
.page-carte{--tc:var(--vert-fonce);--tf:var(--vert-pale);position:relative;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
  transition:transform .25s ease,border-color .2s,box-shadow .2s}
.type-vitrine{--tc:#1d4ed8;--tf:#e4ecff}
.type-boutique{--tc:#a63d0c;--tf:#ffecdd}
.type-liens{--tc:#6d28d9;--tf:#f0e8ff}
.page-titre{display:flex;align-items:center;gap:7px;min-width:0;margin:0 0 8px;padding:6px 8px;border-radius:10px;background:var(--tf);
  color:var(--tc);font-size:14.5px;font-weight:750;line-height:1.2}
.page-titre-txt{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}  /* une ligne : les cartes restent alignées */
.page-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:7px;background:#fff;color:var(--tc)}
.page-ico svg{width:16px;height:16px}
.page-detail{margin-top:2px;font-size:12px;color:var(--encre-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-carte.appui{transform:scale(.97);transition:transform 1s ease}
.page-carte.appui::after{content:"";position:absolute;left:14px;right:14px;bottom:4px;height:3px;border-radius:3px;background:var(--rouge);
  transform-origin:left center;animation:appui-long 1s linear forwards}
@keyframes appui-long{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.page-carte.suppr{border-color:var(--rouge);box-shadow:0 0 0 3px var(--rouge-pale),0 6px 18px rgba(18,37,27,.06)}
.page-suppr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:auto;padding-top:9px}
.page-suppr .btn{min-height:38px;padding:0 6px;gap:5px;font-size:13px}
.page-suppr .btn svg{flex:none;width:15px;height:15px}
@media (max-width:420px){.page-suppr .btn svg{display:none}}
.note-max{margin:-4px 0 16px;padding:11px 14px;border-radius:12px;background:var(--ambre-pale);color:#5c3400;font-size:14px;line-height:1.45}
.note-max b{font-weight:750}
.note-max-grande{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:0}
.types-bloques .type-choix{opacity:.45;cursor:not-allowed}
.types-bloques .type-choix:hover{border-color:var(--ligne-2)}
.sous-barre-retour.avec-texte span{display:inline}  /* l'écran de création garde le mot « Mes pages », même sur téléphone */
dialog.confirmer{width:min(400px,calc(100% - 32px));padding:0;border:0;border-radius:18px;background:#fff;color:var(--encre);
  box-shadow:0 30px 80px -20px rgba(0,0,0,.45)}
dialog.confirmer form{padding:20px}  /* la marge est dans le formulaire : un toucher près du bord ne ferme pas la fenêtre */
dialog.confirmer::backdrop{background:rgba(13,23,18,.55)}
dialog.confirmer[open]{animation:menu-entree .16s ease-out}
dialog.confirmer h2{font-size:19px;margin:0 0 8px}
.cs-page{margin:0 0 6px;font-weight:700;overflow-wrap:anywhere}
#cs-texte{color:var(--encre-2);font-size:14.5px}
.confirmer-boutons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:18px}

/* La page en grand (bouton « Agrandir ») : la vraie page, avec Modifier et Partager */
dialog.agrandir{position:fixed;inset:0;margin:0;padding:0;border:0;border-radius:0;width:100%;max-width:none;height:100%;max-height:none;
  overflow:hidden;background:#fff;color:var(--encre);box-shadow:none}
dialog.agrandir[open]{display:flex;flex-direction:column;animation:menu-entree .18s ease-out}
dialog.agrandir::backdrop{background:rgba(13,23,18,.72)}
.agrandir-tete{flex:none;display:flex;align-items:center;gap:8px;min-height:60px;padding:8px 10px;background:var(--encre);color:#fff}
.agrandir-fermer{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;
  border-radius:12px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer}
.agrandir-fermer svg{width:22px;height:22px}
.agrandir-titre{flex:1;min-width:0}
.agrandir-titre b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agrandir-titre span{display:block;font-size:12px;color:#b8d6c3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agrandir iframe{flex:1;display:block;width:100%;min-height:0;border:0;background:#fff}
.agrandir-pied{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--ligne)}
.agrandir-pied p{grid-column:1/-1;margin:0;padding:8px 0;color:var(--encre-2);font-size:14px;text-align:center}
@media (min-width:700px){
  dialog.agrandir{inset:0;margin:auto;width:min(440px,calc(100% - 32px));height:min(900px,calc(100% - 32px));border-radius:20px;
    box-shadow:0 30px 80px -20px rgba(0,0,0,.5)}
}

/* ---------- Choix du type [patch IB] : chaque type montré par l'aperçu de sa page d'exemple ---------- */
.retour-pages{display:inline-flex;align-items:center;gap:4px;margin-bottom:8px;font-size:14px;font-weight:600;color:var(--encre-2);text-decoration:none}
.retour-pages svg{width:18px;height:18px}
.types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.types > *{min-width:0}
@media (min-width:900px){.types{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}}
.type-choix{display:flex;flex-direction:column;gap:10px;width:100%;padding:8px 8px 14px;border-radius:var(--rayon);background:var(--surface);
  border:2px solid var(--ligne-2);cursor:pointer;font:inherit;color:inherit;text-align:left}
.type-choix:hover,.type-choix.suggere{border-color:var(--vert)}
.type-scene{--mini-zoom:1;display:flex;align-items:center;justify-content:center;width:100%;height:262px;border-radius:11px;overflow:hidden;
  background:radial-gradient(120% 90% at 50% 18%,color-mix(in srgb,var(--c) 18%,#fff),color-mix(in srgb,var(--c) 7%,#eef2ef))}
@media (min-width:640px){.type-scene{--mini-zoom:1.14;height:300px}}
.type-texte{display:block;padding:0 4px}
.type-choix .t{display:block;font-size:16px;font-weight:700;margin-bottom:3px}
.type-choix .d{display:block;color:var(--encre-2);font-size:13.5px;line-height:1.4}

/* ---------- Éditeur ---------- */
.editeur{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
#volets{min-width:0}
@media (min-width:1100px){.editeur{grid-template-columns:minmax(0,1fr) 400px}}
.bandeau{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:var(--rayon);margin-bottom:16px;font-size:14px}
.bandeau.attente{background:var(--ambre-pale);color:#5c3400}
.bandeau.succes{background:var(--vert-pale);color:#0b4425}
.bandeau .btn{flex:0 0 auto}
.bandeau > div{min-width:0}
.volet{background:var(--surface);border:1px solid var(--ligne-2);border-radius:var(--rayon);margin-bottom:12px;overflow:hidden}
.volet > h2{margin:0}
.volet-tete{width:100%;display:flex;align-items:center;gap:12px;padding:16px 18px;background:none;border:0;font:inherit;
  color:inherit;cursor:pointer;text-align:left}
.volet-tete .icone{flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--vert-pale);color:var(--vert-fonce);
  display:flex;align-items:center;justify-content:center}
.volet-tete .icone svg{width:20px;height:20px}
.volet-tete .titre{flex:1;font-weight:700;font-size:16px}
.volet-tete .resume-volet{display:block;font-weight:400;font-size:13px;color:var(--encre-3);margin-top:1px}
.volet-tete .chevron{width:20px;height:20px;color:var(--encre-3);transition:transform .2s}
.volet[data-ouvert="1"] .chevron{transform:rotate(180deg)}
.volet-corps{display:none;padding:2px 18px 18px}
.volet[data-ouvert="1"] .volet-corps{display:block}
.plus-options{margin:8px 0 14px;font-weight:650;color:var(--encre-2);background:none;border:0;cursor:pointer;font:inherit;padding:6px 0}

/* Image : avatar, bannière, fond */
.televerseur{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.vignette{position:relative;flex:0 0 84px;width:84px;height:84px;border-radius:50%;background:#e7eee9;overflow:hidden;
  display:flex;align-items:center;justify-content:center;color:var(--encre-3)}
.vignette.large{flex:1 1 auto;width:100%;height:120px;border-radius:12px}
.vignette img{width:100%;height:100%;object-fit:cover}
.vignette svg{width:30px;height:30px}
.progression{position:absolute;left:0;bottom:0;height:5px;background:var(--vert);width:0;transition:width .2s}
.televerseur .boutons{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.colonne{flex-direction:column;align-items:stretch}

/* Listes : liens, prestations, galerie */
.liste{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:10px}
.element{border:1px solid var(--ligne);border-radius:12px;padding:12px;background:#fbfcfb}
.element-tete{display:flex;align-items:center;gap:10px}
.element-tete .t{flex:1;min-width:0;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.element-tete .p{color:var(--encre-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.element .outils{display:flex;gap:4px}
.icone-btn{width:36px;height:36px;border-radius:10px;border:1px solid var(--ligne);background:#fff;display:inline-flex;align-items:center;
  justify-content:center;cursor:pointer;color:var(--encre-2);padding:0}
.icone-btn svg{width:18px;height:18px}
.icone-btn.danger{color:var(--rouge)}
.element .edition{margin-top:12px;display:none}
.element.ouvert .edition{display:block}
.element .mini{flex:0 0 46px;width:46px;height:46px;border-radius:9px;object-fit:cover;background:#e7eee9}
.grille-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
@media (min-width:600px){.grille-photos{grid-template-columns:repeat(4,1fr)}}
.photo{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#e7eee9}
.photo img{width:100%;height:100%;object-fit:cover}
.photo .outils{position:absolute;top:6px;right:6px;display:flex;gap:4px}
.photo .icone-btn{width:32px;height:32px;background:rgba(255,255,255,.92)}
.photo input{position:absolute;left:6px;right:6px;bottom:6px;min-height:34px;font-size:13px;padding:6px 8px;background:rgba(255,255,255,.94)}
.ajout-photo{aspect-ratio:1;border-radius:10px;border:2px dashed #b8c7bd;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;color:var(--vert-fonce);font-weight:650;font-size:13px;cursor:pointer;background:#fbfcfb}
.ajout-photo svg{width:26px;height:26px}
.ajout{border:1px dashed #b8c7bd;border-radius:12px;padding:12px;background:#fff}

/* Horaires et disponibilités */
.jours{display:flex;flex-direction:column;gap:8px}
.jour{display:grid;grid-template-columns:52px 1fr;gap:8px;align-items:center}
.jour > b{font-size:14px}
.jour .plages{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.jour .plage{display:flex;align-items:center;gap:4px}
.jour input[type=time]{width:auto;min-width:0;min-height:40px;padding:6px 8px;font-size:15px;flex:0 0 108px}
.jour .ferme{color:var(--encre-3);font-size:14px}
.basculer{min-height:34px;padding:0 12px;border-radius:17px;border:1px solid var(--ligne);background:#fff;font:inherit;font-size:13px;
  font-weight:650;cursor:pointer;color:var(--encre-2)}
.basculer[aria-pressed="true"]{background:var(--vert-pale);border-color:#a9d9b9;color:var(--vert-fonce)}

/* Apparence */
.nuancier{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.nuance{width:40px;height:40px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--ligne);cursor:pointer;padding:0}
.nuance[aria-pressed="true"]{box-shadow:0 0 0 2px var(--encre)}
.nuance-perso{position:relative;overflow:hidden;background:conic-gradient(red,yellow,lime,cyan,blue,magenta,red)}
.nuance-perso input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.choix-ligne{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.choix-ligne button{min-height:40px;padding:0 14px;border-radius:10px;border:1px solid var(--ligne);background:#fff;font:inherit;
  font-weight:600;cursor:pointer;color:var(--encre-2)}
.choix-ligne button[aria-pressed="true"]{border-color:var(--vert);background:var(--vert-pale);color:var(--vert-fonce)}

/* Aperçu (téléphone) */
.apercu{position:sticky;top:calc(var(--barre-h) + var(--sous-barre-h) + 16px)}
@media (min-width:1100px){.apercu .telephone{width:auto;height:min(780px,calc(100vh - var(--barre-h) - var(--sous-barre-h) - 40px))}}
.telephone{width:100%;max-width:380px;margin:0 auto;aspect-ratio:9/18.5;border-radius:36px;background:#0d1712;padding:10px;
  box-shadow:0 30px 60px -24px rgba(13,23,18,.55)}
.telephone iframe{width:100%;height:100%;border:0;border-radius:28px;background:#fff}
.apercu-barre{display:none}
.apercu-mobile{display:none}
/* [patch IB] Sur téléphone et tablette : l'aperçu prend tout l'écran, à la vraie largeur du téléphone (plus de cadre qui rétrécit la page). */
@media (max-width:1099px){
  .apercu{display:none;position:fixed;inset:0;z-index:60;background:#fff;padding:0;flex-direction:column}
  .apercu.visible{display:flex}
  .apercu-barre{display:flex;align-items:center;gap:10px;flex:none;min-height:56px;padding:6px 10px;background:var(--encre);color:#fff}
  .apercu-barre .btn{background:rgba(255,255,255,.12);border-color:transparent;color:#fff}
  .apercu-barre span{font-weight:650;font-size:14px;color:#b8d6c3}
  .apercu .telephone{flex:1;width:100%;max-width:none;max-height:none;aspect-ratio:auto;padding:0;border-radius:0;background:#fff;box-shadow:none}
  .apercu .telephone iframe{border-radius:0}
  .apercu-mobile{display:inline-flex;position:fixed;right:16px;bottom:calc(var(--onglets-h) + 16px + env(safe-area-inset-bottom));z-index:35;
    box-shadow:0 10px 24px rgba(14,92,48,.4)}
  body.sans-onglets .apercu-mobile{bottom:calc(16px + env(safe-area-inset-bottom))}
}

/* Partage après publication */
.partage{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:center}
@media (min-width:600px){.partage{grid-template-columns:auto minmax(0,1fr)}}
.partage img.qr{width:120px;height:120px;border-radius:10px;background:#fff;border:1px solid var(--ligne)}
.adresse-page{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.adresse-page code{font-family:inherit;font-weight:650;background:var(--fond);padding:8px 10px;border-radius:10px;word-break:break-all}

/* ---------- Accès (création de compte / connexion) ---------- */
body.ecran-acces{background:linear-gradient(180deg,#e3efe7 0,var(--fond) 320px)}
.acces{max-width:440px;margin:0 auto;padding:24px 16px 40px}
.acces .carte-pro{margin:6px auto 22px;max-width:360px}
.acces h1{font-size:23px;margin-bottom:6px}
.acces .chapo{color:var(--encre-2);margin-bottom:18px}
.btn-google{width:100%;background:#fff;border-color:var(--ligne);font-weight:650}
.btn-google svg{width:20px;height:20px}
.separateur{display:flex;align-items:center;gap:12px;color:var(--encre-3);font-size:13px;margin:16px 0}
.separateur::before,.separateur::after{content:"";flex:1;height:1px;background:var(--ligne)}
.code-saisie{font-size:26px!important;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}
.message{padding:10px 12px;border-radius:10px;font-size:14px;margin:10px 0}
.message.erreur{background:var(--rouge-pale);color:#7a1810}
.message.info{background:var(--vert-pale);color:#0b4425}
.bascule-mode{text-align:center;margin-top:18px;font-size:14px;color:var(--encre-2)}
.etape[hidden]{display:none}

/* ---------- Messages, rendez-vous, statistiques ---------- */
.fil{display:flex;flex-direction:column;gap:10px}
.msg{background:var(--surface);border:1px solid var(--ligne-2);border-radius:var(--rayon);padding:14px 16px}
.msg.non-lu{border-left:4px solid var(--vert)}
.msg-tete{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:baseline}
.msg-tete b{font-size:15.5px}
.msg .texte{margin:8px 0 10px;white-space:pre-wrap;word-wrap:break-word}
.msg .coord{display:flex;gap:8px;flex-wrap:wrap}
.msg form{display:inline}
.rdv{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:start;gap:12px;background:var(--surface);border:1px solid var(--ligne-2);border-radius:var(--rayon);padding:14px}
.rdv .date{text-align:center;border-radius:12px;background:var(--vert-pale);color:var(--vert-fonce);padding:8px 0;line-height:1.1}
.rdv .date b{display:block;font-size:22px}
.rdv .date span{font-size:12px;font-weight:650;text-transform:capitalize}
.rdv .actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.barres{display:flex;align-items:flex-end;gap:3px;height:110px;margin:12px 0 6px}
.barres span{flex:1;background:var(--vert);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}
.barres span.zero{background:var(--ligne)}
.legende-barres{display:flex;justify-content:space-between;color:var(--encre-3);font-size:12px}
.chiffres{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px}
.chiffres b{font-size:20px;font-variant-numeric:tabular-nums}
.tableau-liens{width:100%;border-collapse:collapse;margin-top:12px;font-size:14px}
.tableau-liens td{padding:8px 0;border-top:1px solid var(--ligne-2)}
.tableau-liens td:last-child{text-align:right;font-variant-numeric:tabular-nums;font-weight:650}

/* ---------- Notifications ---------- */
.flash{margin-bottom:14px;padding:12px 14px;border-radius:12px;font-weight:550}
.flash.success{background:var(--vert-pale);color:#0b4425}
.flash.error{background:var(--rouge-pale);color:#7a1810}
.flash.info,.flash.warning{background:var(--ambre-pale);color:#5c3400}
#toast{position:fixed;left:50%;bottom:calc(var(--onglets-h) + 22px + env(safe-area-inset-bottom));transform:translate(-50%,20px);
  background:var(--encre);color:#fff;padding:12px 18px;border-radius:12px;font-weight:600;font-size:14px;opacity:0;pointer-events:none;
  transition:opacity .2s,transform .2s,visibility .2s;z-index:80;max-width:calc(100% - 32px);visibility:hidden}
#toast.visible{opacity:1;transform:translate(-50%,0);visibility:visible}
body.sans-onglets #toast{bottom:calc(28px + env(safe-area-inset-bottom))}
@media (max-width:1099px){body[data-ecran="editeur"] #toast{bottom:calc(var(--onglets-h) + 78px + env(safe-area-inset-bottom))}
  body.sans-onglets[data-ecran="editeur"] #toast{bottom:calc(78px + env(safe-area-inset-bottom))}}
@media (min-width:900px){#toast{bottom:28px}}
dialog{border:0;border-radius:var(--rayon);padding:22px;max-width:420px;width:calc(100% - 32px);box-shadow:var(--ombre)}
dialog::backdrop{background:rgba(13,23,18,.55)}

/* ---------- [patch IR] Parcours étape par étape d'une nouvelle page (même allure que le formulaire d'inscription) ----------
   .editeur porte data-mode="parcours" et body la classe « en-parcours » : seuls les volets de l'étape sont visibles
   (data-etape="oui", parties data-partie), puis l'éditeur complet (data-mode="recap") sert de récapitulatif. */
.parcours-tete,.etape-tete,.etape-pied{display:none}
body.en-parcours .parcours-tete{display:block}
.editeur[data-mode="parcours"] .etape-tete,.editeur[data-mode="parcours"] .etape-pied{display:block}
body.en-parcours .apercu-mobile,body.en-parcours #btn-publier,body.en-parcours #btn-voir,body.en-parcours .bandeau.attente,
body.en-parcours #bandeau-publie,body.en-parcours #bandeau-pret,
.editeur[data-mode="parcours"] .apercu,.editeur[data-mode="parcours"] #btn-plus-options,
.editeur[data-mode="parcours"] .volet:not([data-etape="oui"]),.editeur[data-mode="parcours"] .hors-partie,
.editeur[data-mode="parcours"] .volet > h2{display:none!important}
.parcours-tete{max-width:720px;margin:0 auto 14px;text-align:center}
.parcours-pastille{display:inline-flex;align-items:baseline;margin:0 0 12px;padding:7px 16px;border-radius:999px;background:#dcfce7;color:#166534;font-size:14px}
.parcours-pastille strong{font-size:18px;font-weight:800}
.parcours-pastille span{font-size:16px}
.parcours-pastille .parcours-nom{margin-left:8px;font-size:13.5px;font-weight:600}
.parcours-barre{height:8px;margin:0 0 12px;border-radius:999px;background:#e5e7eb;overflow:hidden}
.parcours-barre span{display:block;width:0;height:100%;border-radius:999px;background:var(--vert);transition:width .45s}
.parcours-etapes{list-style:none;margin:0;padding:0;display:flex;justify-content:center;gap:5px}
.parcours-etapes button{display:block;width:8px;height:8px;min-height:0;padding:0;border:0;border-radius:999px;background:#d1d5db;
  font:inherit;cursor:default;transition:width .3s,background-color .3s}
.parcours-etapes button:disabled{opacity:1}
.parcours-etapes li[data-etat="fait"] button{background:var(--vert);cursor:pointer}
.parcours-etapes li[data-etat="actuel"] button{width:24px;background:var(--vert)}
.parcours-etapes .rond,.parcours-etapes .nom-etape{display:none}
@media (min-width:768px){
  .parcours-pastille{display:none}
  .parcours-etapes{justify-content:space-between;gap:0}
  .parcours-etapes li{position:relative;flex:1;display:flex;justify-content:center}
  .parcours-etapes li::before{content:"";position:absolute;top:16px;left:-50%;right:50%;height:2px;background:#d1d5db}
  .parcours-etapes li:first-child::before{display:none}
  .parcours-etapes li[data-etat="fait"]::before,.parcours-etapes li[data-etat="actuel"]::before{background:#22c55e}
  .parcours-etapes button,.parcours-etapes li[data-etat="actuel"] button,.parcours-etapes li[data-etat="fait"] button{position:relative;
    z-index:1;width:auto;height:auto;display:flex;flex-direction:column;align-items:center;gap:7px;background:none;border-radius:8px;padding:0 2px}
  .parcours-etapes .rond{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;
    background:#e5e7eb;color:#6b7280;font-size:14px;font-weight:700}
  .parcours-etapes li[data-etat="fait"] .rond{background:var(--vert);color:#fff}
  .parcours-etapes li[data-etat="actuel"] .rond{background:var(--vert);color:#fff;box-shadow:0 0 0 4px #bbf7d0}
  .parcours-etapes .nom-etape{display:block;font-size:12px;font-weight:600;color:#6b7280;white-space:nowrap}
  .parcours-etapes li[data-etat="fait"] .nom-etape,.parcours-etapes li[data-etat="actuel"] .nom-etape{color:#15803d}
  .parcours-etapes li[data-etat="fait"] button:hover .nom-etape{text-decoration:underline}
}
.editeur[data-mode="parcours"]{grid-template-columns:minmax(0,1fr)!important;max-width:720px;margin:0 auto}
.editeur[data-mode="parcours"] #volets{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--ligne-2);
  border-radius:18px;box-shadow:var(--ombre);padding:20px 22px 0}
.editeur[data-mode="parcours"] .etape-tete{order:-1}
.editeur[data-mode="parcours"] .etape-pied{order:99}
.editeur[data-mode="parcours"] .volet{margin:0;border:0;border-radius:0;background:none;overflow:visible}
.editeur[data-mode="parcours"] .volet-corps{display:block;padding:14px 0 0}
.etape-titre{font-size:19px;font-weight:750}
.etape-titre:focus{outline:none}
.etape-aide{margin-top:6px;font-size:14.5px;color:var(--encre-2)}
.etape-pied{position:sticky;bottom:0;z-index:5;margin:20px -22px 0;padding:12px 22px calc(12px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.97);border-top:1px solid var(--ligne-2);border-radius:0 0 18px 18px}
.etape-boutons{display:flex;gap:10px}
.etape-boutons .btn{flex:1;min-width:0;min-height:50px;font-size:16px;font-weight:650;white-space:normal;text-align:center}
.etape-resume{margin-top:8px;text-align:center}
.etape-erreur{margin-bottom:10px;padding:9px 12px;border-radius:10px;background:var(--rouge-pale);color:var(--rouge);font-size:14px;font-weight:650}
.champ.invalide-parcours input{border-color:var(--rouge)}
.bandeau-pret-boutons{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.bandeau-pret:focus{outline:none}
.reprendre-parcours{margin:0 0 12px;font-size:14px;color:var(--encre-2)}
.reprendre-parcours .btn{padding:0 4px;min-height:32px;vertical-align:baseline}
@media (min-width:1100px){.bandeau-pret-apercu{display:none}}
@media (max-width:899px){
  .editeur[data-mode="parcours"] #volets{padding:16px 16px 0;border-radius:16px}
  .etape-pied{margin:18px -16px 0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));border-radius:0 0 16px 16px}
  body:not(.sans-onglets) .etape-pied{bottom:calc(var(--onglets-h) + env(safe-area-inset-bottom))}
}
