/* RÈGLE PERMANENTE TOUT KYPER (Damien, 29.11.2026 22h11) : l'interface s'adapte à toutes les tailles d'écran (375 à 5120 px) ; échelle --k-echelle et largeur --k-largeur définies par paliers dans echelle.css ; unités relatives seulement, vh/vw divisés par l'échelle, aucun défilement horizontal. Détail : docs/REGLE_RESPONSIVE_TOUT_KYPER.md. */
/* Gabarit de page V2 de l'espace client (direction A retenue par Damien, 26.11.2026). Template de base des instituts.
   Règles : variables du thème (--k-*) UNIQUEMENT, aucune couleur en dur, aucun style en ligne. S'applique en français seulement (classe posée par gabarit-page.js).
   Maquettes : MANDAT_500K/MAQUETTES_CALYSPA_CENTRE_V2_2026-11-27/. Auteur : KYPER. */

/* --- barre du haut : fine, alignée sur la même largeur utile que le contenu */
body.gabarit-v2 .language-switch{position:static;display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.5rem 2rem 0;margin:0;background:transparent;border:0}
body.gabarit-v2 .language-switch label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.gabarit-v2 .language-switch select{min-height:36px;padding:.2rem .6rem;font-size:max(.9rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 #workspace:not([hidden]){min-height:calc(calc(100vh / var(--k-echelle,1)) - 44px)}
body.gabarit-v2 .content>header{max-width:var(--k-largeur,1240px);margin:0 auto;padding:.9rem 2rem .2rem;min-height:0;display:flex;align-items:center;justify-content:space-between;gap:.8rem}
body.gabarit-v2 .content>header>div{display:flex;align-items:baseline;gap:.5rem;min-width:0}
body.gabarit-v2 .content>header>div>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.gabarit-v2 .content>header strong{font:600 .95rem var(--k-sans);color:var(--k-texte-doux)}
body.gabarit-v2 .content>header .role{font:600 max(.78rem,calc(11px / var(--k-echelle,1))) var(--k-sans);text-transform:none;letter-spacing:0;padding:.15rem .6rem;border-radius:999px;margin-left:auto}

/* --- zone centrale : largeur utile centrée, en-tête de page, espacement régulier */
body.gabarit-v2 main{min-width:0;max-width:var(--k-largeur,1240px);margin:0 auto;padding:.6rem 2rem 3.5rem;min-height:0;display:block}
body.gabarit-v2 main>*+*{margin-top:1.3rem}
body.gabarit-v2 .heading{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem 1.5rem;flex-wrap:wrap;margin:0 0 .4rem}
body.gabarit-v2 .heading h1,body.gabarit-v2 h1#title{font:650 1.9rem/1.15 var(--k-sans);text-transform:none;letter-spacing:0;font-variant:normal;font-variant-caps:normal;max-width:none;margin:0}
body.gabarit-v2 .heading p,body.gabarit-v2 #subtitle{margin:.3rem 0 0;font-size:1rem;max-width:62ch;color:var(--k-texte-doux)}
body.gabarit-v2 .heading>button{flex:none;min-height:42px;padding:0 1.1rem}

/* --- un seul style de bouton : 42 px, coins du thème ; le bouton principal prend la couleur de bouton du thème */
body.gabarit-v2 main button,body.gabarit-v2 main .btn{min-height:42px;padding:.4rem 1rem;font-size:.95rem;font-weight:600;border-radius:var(--k-rayon)}
body.gabarit-v2 main button.primary{background:var(--k-bouton);border-color:var(--k-bouton);color:var(--k-texte-bouton)}

/* --- cartes : fond de surface, bord fin, rayon, ombre douce ; le contenu des écrans y est posé */
body.gabarit-v2 main>section:not([hidden]),body.gabarit-v2 #listing:not([hidden]){background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1.2rem 1.4rem;box-shadow:0 1px 2px color-mix(in srgb,var(--k-texte) 6%,transparent)}
body.gabarit-v2 #beauty-view:not([hidden]){background:transparent;border:0;box-shadow:none;padding:0}
body.gabarit-v2 #overview{background:transparent}
body.gabarit-v2 .message:empty{display:none}

/* --- tableaux : en-têtes calmes, lignes aérées */
body.gabarit-v2 table.data-table{border-collapse:collapse;width:100%}
body.gabarit-v2 table.data-table th{font:600 max(.78rem,calc(11px / var(--k-echelle,1))) var(--k-sans);letter-spacing:.04em;text-transform:uppercase;color:var(--k-texte-doux);background:var(--k-surface-douce);padding:.75rem 1rem;text-align:left;border-bottom:1px solid var(--k-bordure)}
body.gabarit-v2 table.data-table td{padding:.9rem 1rem;border-bottom:1px solid var(--k-bordure);vertical-align:middle}
body.gabarit-v2 table.data-table tr:last-child td{border-bottom:0}

@media (max-width:900px){
 body.gabarit-v2 .language-switch{padding:.4rem 1rem 0}
 body.gabarit-v2 .content>header{padding:.7rem 1rem .1rem}
 body.gabarit-v2 main{padding:.4rem 1rem 3rem}
 body.gabarit-v2 .heading h1,body.gabarit-v2 h1#title{font-size:1.55rem}
 body.gabarit-v2 main>section:not([hidden]),body.gabarit-v2 #listing:not([hidden]){padding:1rem}
}

/* --- Agenda en page cadrée (agenda-cadre.js) */
body.gabarit-v2 .ag-intro{display:none}
body.gabarit-v2 .ag-page{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1.4rem;align-items:start}
body.gabarit-v2 .ag-main,body.gabarit-v2 .ag-cote{display:grid;gap:1rem;min-width:0}
body.gabarit-v2 .ag-main>*{margin:0}
body.gabarit-v2 .ag-main>.beauty-agenda-controls,body.gabarit-v2 .ag-main>.beauty-workspace{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1rem 1.2rem}
body.gabarit-v2 .ag-main>#beauty-day-settings{background:transparent;border:0;padding:0}
body.gabarit-v2 .ag-main>#beauty-day-settings>summary{font-weight:600;color:var(--k-texte-doux);font-size:max(.95rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 .ag-cote>*{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1rem 1.1rem;margin:0}
body.gabarit-v2 .ag-cote .salon-day-summary{border:0;padding:0;box-shadow:none;background:transparent;margin:0}
body.gabarit-v2 .ag-cote .salon-day-summary h2{font:600 1.05rem var(--k-sans);text-transform:none;letter-spacing:0;margin:0 0 .5rem}
body.gabarit-v2 .ag-cote .salon-day-summary-note{display:none}
body.gabarit-v2 .ag-cote .salon-day-summary dl{display:grid;gap:.5rem;margin:0}
body.gabarit-v2 .ag-cote .salon-day-summary dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:.8rem;border:0;border-top:1px solid var(--k-bordure);background:transparent;padding:.55rem 0 0;border-radius:0}
body.gabarit-v2 .ag-cote .salon-day-summary dl>div:first-child{border-top:0;padding-top:0}
body.gabarit-v2 .ag-cote .salon-day-summary dt{color:var(--k-texte-doux);font-size:.95rem}
body.gabarit-v2 .ag-cote .salon-day-summary dd{margin:0;font:650 1.05rem var(--k-sans)}
body.gabarit-v2 .ag-cote .day-print-control{margin:0}
body.gabarit-v2 .ag-cote details>summary{font-weight:600}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem}
body.gabarit-v2 #beauty-new{margin-left:auto}
body.gabarit-v2 .beauty-day-heading h2,body.gabarit-v2 .beauty-day-heading{font:600 1.1rem var(--k-sans);text-transform:none;letter-spacing:0}
body.gabarit-v2 .beauty-planning-legend:empty,body.gabarit-v2 .beauty-planning-legend:has(> span:empty){display:none}
@media (max-width:1100px){body.gabarit-v2 .ag-page{grid-template-columns:1fr}}

/* --- Mes clientes : recherche en une ligne, lignes aérées, une seule action visible (ouvrir la fiche) */
body.gabarit-v2 #listing{display:flex;flex-wrap:wrap;gap:1rem 1.2rem;align-items:flex-end}
body.gabarit-v2 #listing>#search-form{order:1;display:flex;flex-wrap:wrap;gap:.8rem 1rem;align-items:flex-end;flex:1 1 420px;margin:0}
body.gabarit-v2 #listing>#search-form>label[for=search]{flex-basis:100%;font-size:max(.9rem,calc(13px / var(--k-echelle,1)));color:var(--k-texte-doux);margin:0}
body.gabarit-v2 #listing>#search-form>div{display:flex;gap:.6rem;flex:1 1 280px}
body.gabarit-v2 #listing>#search-form input#search{flex:1;min-height:42px}
body.gabarit-v2 #listing>#client-missing-holder{order:2;margin:0}
body.gabarit-v2 #listing>#clientes-filtres{order:3;flex-basis:100%}
body.gabarit-v2 #listing>#clientes-filtres>summary{font-weight:600;color:var(--k-texte-doux)}
body.gabarit-v2 #listing>#list{order:4;flex-basis:100%}
body.gabarit-v2 #listing>.pagination{order:5;flex-basis:100%}
body.gabarit-v2 #list table.data-table td:last-child button,body.gabarit-v2 #list table.data-table td button[data-open]{border:0;background:transparent;color:var(--k-texte);text-decoration:underline;text-underline-offset:3px;min-height:36px;padding:0 .5rem;font-weight:600}
body.gabarit-v2 #list table.data-table td>button{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;min-height:34px;padding:.1rem 0;font-weight:600;display:block}
body.gabarit-v2 .ag-cote .salon-day-summary dl.salon-day-summary-cards,body.gabarit-v2 .ag-cote .salon-day-summary-cards{display:grid;grid-template-columns:1fr;gap:.5rem}
body.gabarit-v2 .ag-cote .salon-day-summary-cards>div{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;min-width:0;width:auto;padding:.55rem 0 0;border:0;border-top:1px solid var(--k-bordure);border-radius:0;background:transparent}
body.gabarit-v2 .ag-cote .salon-day-summary-cards>div:first-child{border-top:0;padding-top:0}
body.gabarit-v2 .ag-page{grid-template-columns:minmax(0,1fr) 300px}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{min-height:38px;padding:0 .85rem}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{gap:.6rem}
body.gabarit-v2 .beauty-day-switch #beauty-selected-day,body.gabarit-v2 #beauty-selected-day{font:650 1.05rem var(--k-sans);margin:0;min-width:9ch;text-align:center}
body.gabarit-v2 #beauty-new{flex:none}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{padding:0 .7rem;font-size:max(.9rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{gap:.5rem}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls>*{margin:0}
body.gabarit-v2 #listing>#search-form>#core-state-field{order:3;display:flex;align-items:center;gap:.5rem;margin:0;font-size:max(.9rem,calc(13px / var(--k-echelle,1)));color:var(--k-texte-doux)}

/* Direction D : le rendez-vous choisi s'affiche en haut de la colonne de droite (panneau d'origine, déplacé) */
body.gabarit-v2 .ag-cote #beauty-editor{order:-1;position:sticky;top:.8rem;max-height:calc((100vh - 2rem) / var(--k-echelle,1));overflow:auto}
body.gabarit-v2 .ag-cote #beauty-editor:empty{display:block;color:var(--k-texte-doux);font-size:.95rem}
body.gabarit-v2 .ag-cote #beauty-editor:empty::before{content:"Cliquez sur un rendez-vous pour le voir ici, le déplacer ou encaisser.";display:block}
@media (max-width:1100px){body.gabarit-v2 .ag-cote #beauty-editor{position:static;max-height:none}}
body.gabarit-v2 .ag-page{grid-template-columns:minmax(0,1fr) 340px}
body.gabarit-v2 .ag-cote #beauty-editor:not(:empty){background:transparent;border:0;box-shadow:none;padding:0}
body.gabarit-v2 .ag-cote .beauty-detail{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1rem 1.1rem;margin:0;display:grid;gap:.7rem}
body.gabarit-v2 .ag-cote .beauty-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:.6rem}
body.gabarit-v2 .ag-cote .beauty-detail h2,body.gabarit-v2 .ag-cote .beauty-detail-heading h2{font:650 1.15rem var(--k-sans);text-transform:none;letter-spacing:0;margin:0}
body.gabarit-v2 .ag-cote .beauty-detail p{margin:0;color:var(--k-texte-doux);font-size:.95rem}
body.gabarit-v2 .ag-cote .beauty-care-list{list-style:none;margin:0;padding:0}
body.gabarit-v2 .ag-cote .beauty-care-list li{display:block;border-top:1px solid var(--k-bordure);padding:.6rem 0 0}
body.gabarit-v2 .ag-cote .beauty-care-list li *{writing-mode:horizontal-tb;max-width:100%;min-width:0;word-break:normal;overflow-wrap:anywhere}
body.gabarit-v2 .ag-cote .beauty-actions{display:flex;flex-wrap:wrap;gap:.5rem}
body.gabarit-v2 .ag-cote .beauty-actions button{flex:0 1 auto}
body.gabarit-v2 .ag-cote .beauty-detail-options{border-top:1px solid var(--k-bordure);padding-top:.6rem}
body.gabarit-v2 .ag-cote .beauty-care-list li{display:flex;flex-wrap:wrap;gap:.15rem .6rem;align-items:baseline}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle{border-radius:var(--k-rayon)}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{padding:0 .6rem}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-switch{padding:0;min-height:42px}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-switch button{min-height:40px;padding:0 .5rem}
body.gabarit-v2 #beauty-selected-day{min-width:0;padding:0 .3rem;font-size:1rem;white-space:nowrap}
body.gabarit-v2 #beauty-new{padding:0 .9rem;white-space:nowrap}
body.gabarit-v2 .ag-main>.beauty-agenda-controls{padding:.8rem 1rem}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{gap:.4rem;flex-wrap:nowrap}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{padding:0 .5rem;font-size:max(.88rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 #beauty-new{margin-left:auto;font-size:max(.9rem,calc(13px / var(--k-echelle,1)));padding:0 .75rem}
@media (max-width:1250px){body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{flex-wrap:wrap}}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls,body.gabarit-v2 .beauty-agenda-controls .beauty-actions.beauty-day-controls{justify-content:flex-start;flex-wrap:wrap;column-gap:.5rem;row-gap:.6rem}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls>*{flex:none}
body.gabarit-v2 .ag-page{grid-template-columns:minmax(0,1fr) 300px}
@media (min-width:1700px){body.gabarit-v2 .ag-page{grid-template-columns:minmax(0,1fr) 340px}}
@media (max-width:1100px){body.gabarit-v2 .ag-page{grid-template-columns:1fr}}
/* --- téléphone : une colonne, rien ne dépasse, titre aligné à gauche */
body.gabarit-v2 .ag-page,body.gabarit-v2 .ag-main,body.gabarit-v2 .ag-cote,body.gabarit-v2 #listing,body.gabarit-v2 #list{min-width:0;max-width:100%}
body.gabarit-v2 .heading{text-align:left;align-items:flex-end}
body.gabarit-v2 .heading>div{min-width:0;flex:1 1 16rem}
@media (max-width:1100px){body.gabarit-v2 .ag-page{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
 body.gabarit-v2 .heading{flex-direction:row;flex-wrap:wrap;align-items:flex-start}
 body.gabarit-v2 .heading h1,body.gabarit-v2 h1#title{text-align:left;max-width:100%}
 body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem}
 body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls>*{width:100%;min-width:0;margin:0}
 body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle{display:flex}
 body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{flex:1}
 body.gabarit-v2 .beauty-agenda-controls .beauty-day-switch{display:flex;justify-content:space-between}
 body.gabarit-v2 #list{overflow-x:auto}
 body.gabarit-v2 .ag-cote #beauty-editor{position:static;max-height:none}
}
body.gabarit-v2 .ag-main,body.gabarit-v2 .ag-cote{grid-template-columns:minmax(0,1fr)}

/* Apparence : texte des étiquettes de palette lisible (AA) */
body.gabarit-v2 .ap-palette small{color:var(--k-texte)}
body.gabarit-v2 .kp-choix.sel small{color:var(--k-texte)}
body.gabarit-v2 .kp-lien{color:var(--k-texte)}
/* Apparence : palette choisie = contour de la couleur de bouton, fond neutre (jamais d'aplat saturé) ; ancienne mention « Propulsé par KYPER » masquée (retirée partout le 22.11.2026) */
body.gabarit-v2 .ap-palette[aria-pressed="true"]{background:var(--k-surface)}
body.gabarit-v2 #ap-niveau{display:none}

/* Apparence coiffure : couleurs des types de rendez-vous (apparence-types.js) */
body.gabarit-v2 .ap-types-liste{display:grid;gap:.6rem;margin:.8rem 0}
body.gabarit-v2 .ap-type{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}
body.gabarit-v2 .ap-type-apercu{display:flex;align-items:center;gap:.6rem;flex:1 1 14rem;min-height:44px;padding:.4rem .8rem;border-radius:var(--k-rayon);background:var(--type-fond);color:var(--k-texte);border-left:3px solid var(--type-filet)}
body.gabarit-v2 .ap-type-apercu b{width:12px;height:12px;border-radius:3px;background:var(--type-filet);display:inline-block}
body.gabarit-v2 .ap-type input[type=color]{width:52px;height:44px;padding:2px}
body.gabarit-v2 .ap-type input[type=text]{width:8.5rem;min-height:44px}

/* Une page dont le contenu est déjà en cartes : la carte extérieure disparaît (pas de cadre dans un cadre) */
body.gabarit-v2 main>section:not([hidden]):has(>section:first-child),body.gabarit-v2 main>section:not([hidden]):has(>.company-form),body.gabarit-v2 main>section:not([hidden]):has(>.branding-settings){background:transparent;border:0;box-shadow:none;padding:0}
body.gabarit-v2 main>section:not([hidden])>section{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1.2rem 1.4rem;margin:0 0 1.2rem;max-width:none}
/* --- titres de section : une seule famille lisible, jamais de capitales (la police de marque reste pour le nom et le logo) */
body.gabarit-v2 main h2,body.gabarit-v2 main h3,body.gabarit-v2 main h4,body.gabarit-v2 main legend,body.gabarit-v2 .fiche-nom{font-family:var(--k-sans);text-transform:none;letter-spacing:0;font-variant:normal;font-variant-caps:normal}
body.gabarit-v2 main h2{font-size:1.15rem;font-weight:650}
body.gabarit-v2 main h3{font-size:1rem;font-weight:650}
body.gabarit-v2 .fiche-nom{font-size:1.5rem;font-weight:650}
body.gabarit-v2 .beauty-time-grid,body.gabarit-v2 .beauty-time-grid *{font-family:var(--k-sans);text-transform:none;letter-spacing:0}
/* fiche d'une cliente : pas de cadre dans un cadre ; retour en lien discret */
body.gabarit-v2 main>section:not([hidden]):has(>article.core-detail){background:transparent;border:0;box-shadow:none;padding:0}
body.gabarit-v2 article.core-detail{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1.2rem 1.4rem}
body.gabarit-v2 #core-detail>button:first-child{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;padding:0;min-height:36px;margin-bottom:.6rem}
/* Formulaire d'un rendez-vous dans la colonne de droite : plus large, champs empilés */
@media (min-width:1101px){body.gabarit-v2 .ag-page:has(#beauty-editor form){grid-template-columns:minmax(0,1fr) 440px}}
body.gabarit-v2 .ag-cote #beauty-editor form{display:grid;gap:.8rem;min-width:0}
body.gabarit-v2 .ag-cote #beauty-editor form *{min-width:0;max-width:100%}
body.gabarit-v2 .ag-cote #beauty-editor form input:not([type=checkbox]):not([type=radio]),body.gabarit-v2 .ag-cote #beauty-editor form select,body.gabarit-v2 .ag-cote #beauty-editor form textarea{width:100%}
body.gabarit-v2 .ag-cote #beauty-editor form fieldset{display:grid;gap:.6rem;border:0;padding:0;margin:0}

/* Direction D (27.11.2026, 21h12) : contrôles arrondis et bordures douces comme la maquette (Damien : « très loin de la maquette »). Aucune couleur en dur. */
body.gabarit-v2{--k-rayon:10px;--k-champ:color-mix(in srgb,var(--k-texte-doux) 75%,var(--k-bordure))}
body.gabarit-v2 main input:not([type=checkbox]):not([type=radio]):not([type=color]),body.gabarit-v2 main select,body.gabarit-v2 main textarea,body.gabarit-v2 .language-switch select{border:1px solid var(--k-champ);border-radius:10px;min-height:42px;padding-inline:.8rem}
body.gabarit-v2 main button,body.gabarit-v2 main .btn{border-color:var(--k-champ);border-radius:10px}
body.gabarit-v2 main button.primary{border-color:var(--k-bouton)}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle{display:inline-flex;border:1px solid var(--k-champ);border-radius:10px;overflow:hidden;background:var(--k-surface)}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button{border:0;border-radius:0;border-left:1px solid var(--k-bordure);box-shadow:none}
body.gabarit-v2 .beauty-agenda-controls .beauty-view-toggle button:first-child{border-left:0}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-switch{display:inline-flex;align-items:center;border:1px solid var(--k-champ);border-radius:10px;overflow:hidden;background:var(--k-surface)}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-switch button{border:0;border-radius:0;box-shadow:none}
body.gabarit-v2 h1:focus,body.gabarit-v2 h1:focus-visible{outline:none}

/* Barre de recherche du haut (maquette D) */
body.gabarit-v2 #barre-recherche{flex:1 1 22rem;max-width:34rem;margin:0}
body.gabarit-v2 #barre-recherche input{width:100%;min-height:44px;padding-inline:1rem;border:1px solid var(--k-champ);border-radius:12px;background:var(--k-surface);color:var(--k-texte)}

/* Rail teinté (maquette D) : l'entrée active et le survol restent lisibles, en blanc, quand la navigation du thème est une teinte douce */
body.gabarit-v2 .sidebar nav button:hover{background:var(--k-surface);color:var(--k-texte)}
body.gabarit-v2 .sidebar nav button[aria-current]{background:var(--k-navigation-active,var(--k-surface));color:var(--k-texte-navigation-active,var(--k-texte))}
@media (max-width:760px){body.gabarit-v2 #barre-recherche{flex:1 1 100%;max-width:none;order:5}body.gabarit-v2 .content>header{flex-wrap:wrap}}

/* Lot 1 d'alignement sur la maquette D : en-tête de colonne du planning blanc et centré (le titre à empattement de D n'est pas repris : la police de marque de Calyspa, Cinzel, ne s'écrit qu'en petites capitales) */
body.gabarit-v2 #beauty-view .beauty-resource-column>header{display:block;background:var(--k-surface);text-align:center}
body.gabarit-v2 #beauty-view .beauty-resource-column>header h3{font-weight:650;text-align:center}

/* Plancher de lisibilité avec l'échelle -20 % : les petits textes de l'agenda gardent au moins 12 px effectifs (15 px déclarés x 0,8) */
body.gabarit-v2 #beauty-view :is(.beauty-time-grid time,.beauty-time-grid header:not(:has(h3)),.beauty-planning-note,.ag-legende,.beauty-resource-column time){font-size:max(15px,1em)}

/* « Autres outils de l'agenda » (maquette D) : colonne légère, boutons à contour fin et doux, texte régulier */
body.gabarit-v2 .ag-cote details:not(#beauty-editor) button{border:1px solid var(--k-bordure);background:var(--k-surface);font-weight:500;box-shadow:none}
body.gabarit-v2 .ag-cote details:not(#beauty-editor) button:hover{background:var(--k-surface-douce)}
body.gabarit-v2 .ag-cote details:not(#beauty-editor) :is(.beauty-tools,.beauty-actions){gap:.5rem}

/* Cartes de rendez-vous lisibles malgré l'échelle -20 % : nom en 13,75 px déclarés (11 px effectifs), soin et horaire sur UNE ligne ; cartes courtes : nom seul */
body.gabarit-v2 #beauty-view .beauty-grid-event{display:flex;flex-wrap:wrap;align-content:flex-start;column-gap:.5rem;padding-block:3px;line-height:1.2}
body.gabarit-v2 #beauty-view .beauty-grid-event strong{flex:1 0 100%;font-size:max(14.8px,1em)}
body.gabarit-v2 #beauty-view .beauty-grid-event span,body.gabarit-v2 #beauty-view .beauty-grid-event small{font-size:max(14.8px,1em)}
body.gabarit-v2 #beauty-view .beauty-grid-event span+span::before{content:"· ";color:var(--k-texte-doux)}
body.gabarit-v2 #beauty-view .beauty-grid-event:is(.beauty-grid-short,.beauty-grid-micro) :is(span,small){display:none}

/* Une personne seule (un seul lieu) : pas de choix de lieu, pas de rappel du lieu (maquette D adaptée) */
body.gabarit-v2 .ag-solo label:has(> select[name=branch]){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap} /* retiré de la vue mais gardé pour les lecteurs d'écran et le formulaire */
body.gabarit-v2 .ag-solo .beauty-applied-filter:not(.beauty-filter-active){display:none}

/* « Sa fiche » (maquette D) : carte sous le rendez-vous choisi, lien d'ouverture de la fiche de la cliente */
body.gabarit-v2 .ag-fiche{background:var(--k-surface);border:1px solid var(--k-bordure);border-radius:14px;padding:1rem 1.1rem}
body.gabarit-v2 .ag-fiche h3{margin:0 0 .4rem;font:650 1.05rem var(--k-sans)}
body.gabarit-v2 #beauty-editor #beauty-open-client{display:none}
body.gabarit-v2 .ag-fiche button{border:0;background:transparent;box-shadow:none;padding:0;min-height:0;color:var(--k-bouton);font-weight:650;text-decoration:underline;text-underline-offset:3px}
/* Légende des soins (maquette D) : une pastille de la couleur de la catégorie, couleur posée par le CSSOM */
body.gabarit-v2 .ag-legende{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;margin:0;font-size:max(.9rem,calc(13px / var(--k-echelle,1)));color:var(--k-texte-doux)}
body.gabarit-v2 .ag-legende span{display:inline-flex;align-items:center;gap:.4rem}
body.gabarit-v2 .ag-legende i{width:12px;height:12px;border-radius:4px;display:inline-block;background:var(--k-bordure)}

/* Barre du haut pleine largeur avec trait de séparation et bouton « Aujourd'hui » (maquette D) */
body.gabarit-v2 .content>header{max-width:none;padding-inline:2rem;border-bottom:1px solid var(--k-bordure);background:var(--k-surface)}
body.gabarit-v2 #ag-aujourdhui{min-height:40px;padding:0 .9rem;border:1px solid var(--k-champ);border-radius:10px;background:var(--k-surface);font-weight:600}
body.gabarit-v2 .beauty-agenda-controls .beauty-day-controls{align-items:center}
body.gabarit-v2 .content>header{margin-bottom:1rem}

/* Liste du jour (« En liste ») : en-tête espacé et lignes sobres, une ligne par rendez-vous : heure, nom et soin, horaire, poste */
body.gabarit-v2 #beauty-view .beauty-agenda-head{display:grid;grid-template-columns:90px minmax(0,1fr) 170px;gap:1rem;align-items:baseline;padding:.6rem 1rem;border-bottom:1px solid var(--k-bordure);color:var(--k-texte-doux);font-weight:600}
body.gabarit-v2 #beauty-view .beauty-agenda-head strong{font-weight:600;color:var(--k-texte-doux)}
body.gabarit-v2 #beauty-view .beauty-agenda-head span:last-child{text-align:right}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot){display:grid;grid-template-columns:90px minmax(0,1fr) 170px;grid-template-areas:"t m r" "t w r" ". s .";column-gap:1rem;row-gap:.1rem;align-items:center;text-align:left;width:100%;margin:0 0 .5rem;padding:.7rem 1rem;border:1px solid var(--k-bordure);border-radius:12px;background:var(--k-surface);box-shadow:none}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) .beauty-slot-time{grid-area:t;font:650 1.1rem var(--k-sans);letter-spacing:0}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) .beauty-slot-when{grid-area:w;color:var(--k-texte-doux)}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) .beauty-slot-main{grid-area:m;display:flex;flex-wrap:wrap;gap:.1rem .6rem;align-items:baseline}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) .beauty-slot-main strong{font:650 1rem var(--k-sans)}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) .beauty-slot-resource{grid-area:r;text-align:right;color:var(--k-texte-doux)}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot) small{grid-area:s;color:var(--k-texte-doux)}
body.gabarit-v2 #beauty-view .beauty-slot:not(.beauty-planning-lane .beauty-slot):hover{background:var(--k-surface-douce)}

/* Liste « Mes clientes » (direction F) : pastille d'initiale (span masqué aux lecteurs d'écran), « Ouvrir sa fiche » à droite du nom, sous le nom sur écran étroit. Couleurs = rôles du thème. La cellule reste une vraie cellule de tableau. */
body.gabarit-v2 #list table.data-table td:first-child:has(> strong > .cl-initiale){position:relative;padding-right:9rem}
body.gabarit-v2 #list table.data-table td:first-child>strong:has(> .cl-initiale){display:flex;align-items:center;gap:.85rem;font-size:max(1rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 #list table.data-table .cl-initiale{flex:none;display:inline-grid;place-items:center;width:2.4rem;height:2.4rem;border-radius:50%;background:var(--k-surface-douce);color:var(--k-texte);font-weight:600;font-size:max(.95rem,calc(13px / var(--k-echelle,1)))}
body.gabarit-v2 #list table.data-table td:first-child>strong:has(> .cl-initiale)~small{margin:-.35rem 0 0 3.25rem}
body.gabarit-v2 #list table.data-table td:first-child>strong:has(> .cl-initiale)~button[data-read]{position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:inline-block;color:var(--k-texte);text-decoration:underline;text-underline-offset:3px;font-weight:600}
body.gabarit-v2 #list table.data-table td:first-child>strong:has(> .cl-initiale)~button[data-read]:hover{text-decoration-thickness:2px}
@media (max-width:720px){
 body.gabarit-v2 #list table.data-table td:first-child:has(> strong > .cl-initiale){padding-right:1rem;min-width:15rem}
 body.gabarit-v2 #list table.data-table td:first-child>strong:has(> .cl-initiale)~button[data-read]{position:static;transform:none;margin:.2rem 0 0 3.25rem;min-height:44px}
}

/* Mes factures et devis (direction G) : les filtres tiennent sur une seule ligne, discrets, au lieu d'un grand formulaire. */
body.gabarit-v2 .finance-filters{padding:.85rem 1rem;margin-block:.9rem;background:var(--k-surface-douce);border:1px solid var(--k-bordure);border-radius:12px}
body.gabarit-v2 .finance-filters .finance-grid{display:grid;grid-template-columns:minmax(220px,2fr) repeat(4,minmax(130px,1fr));gap:.5rem .8rem;align-items:stretch}
body.gabarit-v2 .finance-filters .finance-grid>div{display:flex;flex-direction:column;justify-content:flex-end}
body.gabarit-v2 .finance-filters .finance-grid label{font-weight:500;font-size:max(.85rem,calc(13px / var(--k-echelle,1)));color:var(--k-texte-doux);margin-bottom:.2rem;display:block}
body.gabarit-v2 .finance-filters .finance-grid :is(input,select){box-sizing:border-box;height:42px;min-height:42px;width:100%;margin:0}
@media (max-width:1100px){body.gabarit-v2 .finance-filters .finance-grid{grid-template-columns:1fr 1fr}}
@media (max-width:560px){body.gabarit-v2 .finance-filters .finance-grid{grid-template-columns:1fr}}
body.gabarit-v2 .finance-filters .finance-grid select{padding-block:0;line-height:1.2}

/* Pas de défilement fantôme (28.11.2026) : la barre de la langue (au-dessus de l'espace) est comptée dans la hauteur, sinon la page dépassait toujours de cette barre. */
@media (min-width:901px){
  body.gabarit-v2 .language-switch{box-sizing:border-box;height:44px;padding-top:.25rem;padding-bottom:0}
  body.gabarit-v2 #workspace:not([hidden]){min-height:calc(100vh / var(--k-echelle,1) - 44px)}
  body.gabarit-v2 .sidebar{height:calc(100vh / var(--k-echelle,1) - 44px)}
}

/* Agenda sans défilement de la page (session agenda, 29.11.2026) : bloc limité à l'agenda ; ne modifie ni « Pas de défilement fantôme » ni les règles communes. */
body.gabarit-v2:has(#beauty-view:not([hidden])) footer{padding-block:.2rem;min-height:0}
body.gabarit-v2 #beauty-view .beauty-toolbar{padding-bottom:6px;gap:8px 12px}
body.gabarit-v2 #beauty-view .beauty-toolbar label{flex:1 1 180px}
body.gabarit-v2 #beauty-view .beauty-agenda-controls{gap:6px}
body.gabarit-v2 #beauty-view .beauty-planning-note,body.gabarit-v2 #beauty-view .beauty-scope{margin:2px 0;font-size:max(14px,1em)}

/* Responsive 360 px (29.11.2026) : la page Apparence ne dépasse plus l'écran ; les grilles ne sont jamais plus larges que leur conteneur. */
body.gabarit-v2 .ap-bloc{min-width:0;box-sizing:border-box;max-width:100%}
body.gabarit-v2 .ap-roles{grid-template-columns:repeat(auto-fit,minmax(min(310px,100%),1fr))}
body.gabarit-v2 .ap-palettes{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))}
@media(max-width:480px){body.gabarit-v2 .ap-role{grid-template-columns:44px minmax(0,1fr)}body.gabarit-v2 .ap-role>input[type=text]{grid-column:1/-1}}

/* Responsive téléphone (29.11.2026) : zones à toucher d'au moins 44 px et textes de lecture d'au moins 13 px (jamais sous 11 px). */
@media(max-width:480px){
  body.gabarit-v2 main button,body.gabarit-v2 main select,body.gabarit-v2 main a.button,body.gabarit-v2 #workspace button:not(.sidebar button),body.gabarit-v2 #workspace select{min-height:44px}
  body.gabarit-v2 #workspace #list button,body.gabarit-v2 #workspace #list select{min-height:44px}
  body.gabarit-v2 main p.hint,body.gabarit-v2 main dt,body.gabarit-v2 main .guide-state,body.gabarit-v2 main .role,body.gabarit-v2 main .ap-bloc small{font-size:max(13px,calc(13px/var(--k-echelle,1)))}
}

/* Responsive téléphone, lot 2 (29.11.2026) : derniers textes de lecture entre 11 et 13 px et dernière zone à toucher sous 44 px (mesure_dom.js à 360 px). Les étiquettes du menu du bas et les aperçus de couleurs (kp-*) restent petits : ce ne sont pas des textes de lecture. */
@media(max-width:480px){
  body.gabarit-v2 footer,body.gabarit-v2 #workspace th,body.gabarit-v2 #workspace small,body.gabarit-v2 #role,body.gabarit-v2 .language-switch label{font-size:max(13px,calc(13px/var(--k-echelle,1)))}
  body.gabarit-v2 #interface-language,body.gabarit-v2 #workspace summary{min-height:44px;box-sizing:border-box}
  body.gabarit-v2 #workspace summary{padding-block:.55rem}
}

/* Carte « Sa fiche » : ligne de résumé de la cliente (visites), reprise du panneau (agenda, 29.11.2026). */
body.gabarit-v2 #beauty-editor .beauty-client-summary{display:none}
body.gabarit-v2 .ag-fiche .ag-fiche-resume{margin:.15rem 0 .6rem;font-size:max(14px,1em);color:var(--k-texte-doux)}
/* Sélecteur de langue dans l'en-tête (29.11.2026) : plus de bande vide au-dessus ; la hauteur n'est plus réduite de 44 px (sauf le bandeau d'aperçu, quand il existe). */
body.gabarit-v2 .content>header .language-switch{position:static;display:flex;align-items:center;justify-content:flex-end;height:auto;margin:0;padding:0;border:0;background:transparent}
body.gabarit-v2 .content>header .language-switch select{min-height:44px;width:auto}
body.gabarit-v2 .content>header .aide-bouton{margin-left:.3rem}
@media (min-width:901px){
  body.gabarit-v2:has(.content>header .language-switch) #workspace:not([hidden]){min-height:calc((100vh - var(--k-bandeau,0px)) / var(--k-echelle,1))}
  body.gabarit-v2:has(.content>header .language-switch) .sidebar{height:calc((100vh - var(--k-bandeau,0px)) / var(--k-echelle,1))}
}
body:has(#apercu-bandeau){--k-bandeau:34px}

/* Agenda en colonnes : plus de place pour la grille des heures (29.11.2026). La légende des soins est DANS la carte des outils (maquette D) ; le titre « Planning du jour » et la bande vide ne prennent plus de hauteur (la page dit déjà « Rendez-vous du jour »). */
body.gabarit-v2 .ag-main>.beauty-agenda-controls .ag-legende{margin:.5rem 0 0;padding:0}
body.gabarit-v2 #beauty-agenda.beauty-layout-colonnes .beauty-day-heading{display:none}
body.gabarit-v2 .ag-solo #beauty-agenda.beauty-layout-colonnes>.beauty-applied-filter{display:none} /* le lieu reste affiché quand il y en a plusieurs */
body.gabarit-v2 .ag-main>.beauty-workspace{padding:.5rem .8rem}
body.gabarit-v2 #beauty-agenda.beauty-layout-colonnes~.beauty-scope,body.gabarit-v2 .beauty-workspace:has(.beauty-layout-colonnes .beauty-planning-scroll)~.beauty-scope{display:none}

/* Agenda : plus de bande vide entre la carte d'outils et la grille (29.11.2026). Les deux paragraphes d'état restent dans la page (lus par les lecteurs d'écran quand ils se remplissent) ; vides, ils ne prennent plus de place. */
body.gabarit-v2 .ag-main>p:empty{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%)}

/* Agenda : un rendez-vous sélectionné allonge le panneau de droite (détail, Sa fiche, chiffres) et faisait défiler toute la page ; le panneau défile maintenant à l'intérieur de sa colonne (29.11.2026). */
@media (min-width:1100px){
  body.gabarit-v2 .ag-cote{max-height:calc(100vh / var(--k-echelle,1) - 22.5rem - var(--k-bandeau,0px) / var(--k-echelle,1));overflow-y:auto;overscroll-behavior:contain}
}

/* Formulaires de l'espace (Mes coordonnées, Mon mot de passe...) : plus de carte étroite collée à gauche ni de bord gris en dur ; la carte prend la largeur de lecture du gabarit et suit le thème du client (29.11.2026, cause trouvée par kyper-site-web : .company-form de editorial.css). */
body.gabarit-v2 .company-form{max-width:none;background:var(--k-surface);border-color:var(--k-bordure)}

/* « Votre entreprise » (étiquette de l'en-tête, lue par les lecteurs d'écran) à 13 px effectifs au moins (règle KYPER +10 % et lisibilité, 30.11.2026). */
body.gabarit-v2 .content>header>div>span{font-size:calc(13px / var(--k-echelle,1))}

/* TEXTE LU À 13 px EFFECTIFS AU MINIMUM (orchestrateur 30.11.2026 ; Damien 29.11 22h11 « les textes sont un peu petits ») : plancher EXACT posé seulement sur les éléments mesurés sous 13 px effectifs à 1440 px (liste issue du tour d'écrans), jamais de taille plus grande imposée. Aperçus décoratifs (.kp) exclus. */
@media (min-width:901px){
body.gabarit-v2 :is(div.menu-raccourcis > h2,
  button.menu-raccourci > span,
  button.menu-seul > span,
  details.menu-groupe > button,
  aside.sidebar > button.menu-reduire,
  div.sidebar-bottom > button,
  header > span.role,
  div.jour-tete > p,
  p.jour-pied > button.jour-lien,
  div.guide-heading > button,
  section.onboarding > p.guide-progress,
  header > span.guide-state,
  article.guide-step > p.hint,
  div.guide-actions > button,
  div.guide-validation > button,
  div.content > footer,
  details.beauty-day-settings > summary,
  form.beauty-toolbar > button,
  form.beauty-toolbar > button.beauty-quiet,
  div.beauty-view-toggle > button,
  div.beauty-day-controls > button,
  div.beauty-day-controls > button.primary,
  button.beauty-grid-event > strong,
  button.beauty-grid-event > span,
  section.salon-day-summary > p.salon-day-summary-cancelled,
  div.beauty-actions > button,
  details.beauty-tools > p.hint,
  div.day-print-controls > button.day-print-launch,
  div.heading > button.primary,
  form.search > label,
  th > span.sr-only,
  div.row-actions > button,
  div.pagination > button,
  div.pagination > span,
  div.team-heading > p,
  div.team-heading > button.primary,
  div.actions > button,
  section.caisse-ticket > p.hint,
  fieldset.caisse-taux > legend,
  fieldset.caisse-modes > legend,
  form.stock-filters > button,
  div.team-heading > button,
  div.actions > button.primary,
  button.ap-palette > span,
  button.ap-palette > small,
  div.ap-generer > button,
  div.ap-role > span,
  div.ap-actions > button.primary,
  div.ap-actions > button,
  div.ap-agenda-ligne > button,
  div.ap-type > button.ap-type-origine,
  form > button.primary,
  form.history-filters > button,
  section > p.hint,
  details.import-panel > p,
  form > label.checkbox,
  form.import-panel > p,
  form.import-panel > button.primary,
  section.import-panel > p,
  details.import-panel > button,
  div.waitlist-filters > p.waitlist-date-filter-note,
  div.waitlist-filters > button,
  form.waitlist-create > button):not(.kp *){font-size:calc(13px / var(--k-echelle,1)) !important}

/* Plancher 13 px effectifs : éléments mesurés sous 13 (30.11) */
body.gabarit-v2 :is(summary > span, div > strong#company, .content div > dt, #client-missing-entry, form > button, .content div > button, tr > th, td > strong, td > button, tr > td, #modules-preview, form > p, #fiduciary-export-download, section > button):not(.kp *):not(.caisse-btn){font-size:calc(13px / var(--k-echelle,1)) !important}
}
@media (min-width:901px){body.gabarit-v2 :is(.menu-raccourcis > button, .menu-groupes > button.menu-seul, #core-detail fieldset > legend, section#setup > div:first-child > button, section#setup > div:first-child > div > div > span, section#setup small, section#setup label > div > span, section#setup section > p, section#setup section > div > button):not(.kp *){font-size:calc(13px / var(--k-echelle,1)) !important}}
@media (max-width:900px){body.gabarit-v2 nav.menu-bas > button{font-size:13px !important}}
/* État vide d'une liste : gros bouton d'ajout (29.11.2026) */
body.gabarit-v2 .empty .empty-add{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 24px;margin-top:12px;font-size:1.05rem}
body.gabarit-v2 [id="add"]:disabled{opacity:.55;cursor:not-allowed}
/* Un seul lieu : le champ « Lieu de travail » reste caché même si une règle d'affichage plus précise le montre (29.11.2026). */
[data-lieu-unique="cache"]{display:none !important}

/* Agenda : lignes resserrées (le texte garde sa taille) pour retrouver 6 heures visibles de la grille à 1440 x 900 avec l'agrandissement de 10 % (30.11.2026). */
@media (min-width:1100px){
  body.gabarit-v2 .ag-main{gap:.55rem}
  body.gabarit-v2 .ag-main>.beauty-agenda-controls{padding-block:.5rem}
  body.gabarit-v2 .ag-main>.beauty-agenda-controls .beauty-day-controls{margin-block:.9rem .6rem}
  body.gabarit-v2:has(#beauty-view:not([hidden])) main{padding-bottom:.8rem}
  body.gabarit-v2:has(#beauty-view:not([hidden])) footer{padding-block:.1rem}
}
/* Pages entières du salon de coiffure (Clientes à rappeler, Produits en vente, Équipe et horaires) : la carte prend toute la largeur de lecture, plus de carte étroite de 720 px (30.11.2026). */
body.gabarit-v2 :is(#rappels-coiffure-view,#produits-coiffure-view,#equipe-coiffure-view) .jour-carte{max-width:none}
