/* Atelia · console · paramètres d'un restaurant, dans sa fenêtre (screens/restaurant-parametres.js, page « Restaurants »).
   Palette inchangée : var(--…) seulement, composants existants (.field, .btn, .note, .hint). Console : 1280 px seulement. */

.rp { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rp-tete { font-size: 13px; color: var(--ink); }
.rp-intro { margin: -4px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rp .note { margin: 0; overflow-wrap: anywhere; }
.rp .note.rp-ok { color: var(--vert); background: var(--vert-bg); border-color: var(--vert-bd); border-style: solid; }
.rp-vide { margin: 0; font-size: 12.5px; color: var(--muted); }

/* Rubriques : deux colonnes, le food cost et les prix sur toute la largeur. */
.rp-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.rp-rub { border: 1px solid var(--line-2, var(--line)); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-rub.rp-large { grid-column: 1 / -1; }
.rp-rub h5 { margin: 0; font-size: 13.5px; font-weight: 800; color: var(--navy); }
.rp-absente { font-size: 12px; font-weight: 600; }
.rp .field { margin: 0; min-width: 0; gap: 4px; }
.rp .field select, .rp .field textarea { background: var(--surface); max-width: 100%; box-sizing: border-box; }
.rp .field textarea { resize: vertical; min-height: 54px; line-height: 1.4; font-size: 13px; }
.rp .hint { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.rp-saisie { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rp-saisie input { width: 130px; background: var(--surface); box-sizing: border-box; }
.rp-unite { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rp-champ.rp-calcule input { border-style: dashed; color: var(--ink-2); }
.rp input[aria-invalid="true"], .rp select[aria-invalid="true"], .rp textarea[aria-invalid="true"] { border-color: var(--rouge); background: var(--rouge-bg); }
.rp-err { font-size: 11.5px; color: var(--rouge); overflow-wrap: anywhere; }
.rp-err:empty { display: none; }
.rp-duo { display: flex; gap: 12px; flex-wrap: wrap; }
.rp-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.rp-aide-calc { margin: -2px 0 0; }

/* Food cost : un taux global ou un tableau par produit. */
.rp-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-mode { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.rp-mode:has(input:checked) { border-color: var(--accent); }
.rp-mode input { margin: 0; }
.rp-garde { margin: 0; font-size: 12px; }
.rp-tableau { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rp-tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-2); padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rp-tbl td { padding: 3px 6px; border-bottom: 1px solid var(--line-2, var(--line)); white-space: nowrap; }
.rp-tbl td input { width: 92px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 12.5px; background: var(--surface-2); color: var(--ink); box-sizing: border-box; }
.rp-tbl td.rp-td-nom input { width: 100%; min-width: 150px; }
.rp-tbl td input::placeholder { font-size: 11px; }
.rp-tbl td input:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 2px rgba(36,86,196,.15); }
.rp-tbl td .rp-unite { margin-left: 4px; font-size: 11.5px; }
.rp-fc { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; text-align: right; }
.rp-suppr { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.rp-suppr:hover, .rp-suppr:focus-visible { color: var(--rouge); background: var(--rouge-bg); }
.rp-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rp-tab-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-nb { font-size: 12px; margin-left: auto; }
.rp-apercu, .rp-applique { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.rp-base { margin: 0; }
.rp-non-rapp { display: block; margin-top: 4px; font-size: 12px; color: var(--orange, var(--ink-2)); font-weight: 600; }

/* Collage depuis un tableur : la zone, puis l'aperçu avant d'entrer dans le tableau. */
.rp-collage { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rp-collage label { font-size: 12.5px; overflow-wrap: anywhere; }
.rp-collage textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); color: var(--ink); resize: vertical; }
.rp-apercu-collage { font-size: 12.5px; }
.rp-sens { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.rp-sens label { font-weight: 700; }
.rp-sens select { background: var(--surface); max-width: 100%; }
.rp-tbl-apercu td { padding: 4px 6px; }
.rp-plus { margin: 0; font-size: 12px; }
.rp-ecartees { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.rp-pied-collage { display: flex; gap: 8px; flex-wrap: wrap; }

/* 08/11 (carte 55e31789) : import d'un fichier, lu dans le navigateur ; lignes non rapprochées dites à part. */
.rp-import .rp-tbl-apercu th, .rp-import .rp-tbl-apercu td { white-space: normal; overflow-wrap: anywhere; }
.rp-import .rp-tbl-apercu tr.rp-import-dehors td { color: var(--muted); }
.rp-import-cols { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.rp-dehors { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.rp-dehors ul { margin: 4px 0 0; padding-left: 18px; }

/* 08/11 (carte 4a7ea8e5) : commissions mesurées, en lecture seule, à part des champs saisis. */
.rp-cl { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; min-width: 0; overflow-wrap: anywhere; }
.rp-cl-pf { flex: none; width: 82px; font-weight: 700; color: var(--ink); }
.rp-cl-txt { min-width: 0; color: var(--ink); }
.rp-cl-non { font-weight: 600; color: var(--ink-2); }
.rp-cl-etat { margin: 0; font-size: 12.5px; }
.rp-cl-puce { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.rp-cl-puce.rp-cl-diff { color: var(--orange, var(--ink)); border-color: var(--orange-bd, var(--line)); background: var(--orange-bg, var(--surface)); }
/* 09/11 (carte 4a7ea8e5, deuxième tentative) : commission mesurée sur une facture Deliveroo importée, à part de la mesure des relevés. */
.rp-cl-pf small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.rp-cl-facture { padding-top: 8px; border-top: 1px dashed var(--line); }
.rp-facture { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rp-facture-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-facture-etat { font-size: 12px; }
.rp-facture-choix p { margin: 0 0 6px; }
.rp-facture .rp-facture-choix { flex-direction: column; align-items: stretch; } /* une .note est une rangée : le message en entier, les boutons dessous */
.rp-facture .note { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; }

/* 09/11 (carte 6e4fd19b) : note de l'équipe, la première rubrique de la fenêtre ; texte libre, compte des caractères, enregistrée à part. */
.rp-note .rp-note-texte { width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.45; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.rp-note .rp-note-texte:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(36,86,196,.15); }
.rp-note .rp-note-texte[readonly] { color: var(--ink-2); }
.rp-note-pied { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.rp-note-qui { font-size: 12px; overflow-wrap: anywhere; }
.rp-note-compte { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-note-compte.rp-note-trop { color: var(--rouge); font-weight: 700; }
.rp-note-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-note-etat { margin: 0; font-size: 12.5px; }
/* 10/11 (carte 01c4be35) : part maximale sous offres, juste après la note ; un entier de 0 à 100, vide : pas de cible. */
.rp-cible .rp-saisie input { width: 96px; font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.rp-cible .rp-saisie input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(36,86,196,.15); }
.rp-cible .rp-saisie input[aria-invalid="true"] { border-color: var(--rouge); background: var(--rouge-bg); }
.rp-cible-etat { margin: 0; font-size: 12.5px; }
@media (max-width: 600px) { .rp-grille-note .rp-cible { grid-column: 1 / -1; } }

/* Interrupteur du budget publicitaire maximal. */
.rp-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); width: fit-content; }
.rp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rp-piste { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background .15s; flex: none; }
.rp-piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(22,36,63,.3); transition: transform .15s; }
.rp-switch input:checked + .rp-piste { background: var(--accent); }
.rp-switch input:checked + .rp-piste::after { transform: translateX(16px); }
.rp-switch input:focus-visible + .rp-piste { box-shadow: 0 0 0 3px rgba(36,86,196,.3); }
.rp-switch input:disabled + .rp-piste { opacity: .55; }

/* Pied : compte des changements, annuler, enregistrer ; lien vers les paramètres d'onboarding. */
.rp-pied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2, var(--line)); }
.rp-compte { font-size: 12.5px; color: var(--ink-2); margin-right: auto; }
.rp-bas { display: flex; justify-content: flex-end; }
.rp-bas .rc-lien { font-size: 12px; }
/* 22/10 : début de collaboration (champ date et « Vider »). */
.rp-saisie.rp-jour input { width: 170px; }
/* 22/10 (point 30) : prestations du restaurant, un interrupteur chacune, à la ligne sur un écran étroit. */
.rp-prestas { display: flex; flex-wrap: wrap; gap: 10px 22px; min-width: 0; }
.rp-prestas .rp-switch { font-weight: 600; }
