/* Espace client Swann Création — mobile d'abord (360 px), lisible, gros boutons (48 px), contraste AA. */
:root {
  --bleu: #062b8a; --bleu-2: #2456d6; --bleu-pale: #e8eefc; --creme: #f5f0e6; --creme-2: #fbf9f4;
  --encre: #1b2233; --gris: #5b6478; --bord: #ddd5c4; --vert: #17803d; --vert-pale: #e3f4e8; --rouge: #b42318; --rouge-pale: #fdecea;
  --ambre: #8a5a00; --ambre-pale: #fff3d6; --fond: #f7f4ee; --carte: #fff; --ombre: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 14px rgba(20, 30, 60, .06);
  --r: 14px; --nav: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --encre: #e9ecf3; --gris: #a7afc2; --bord: #343b4d; --fond: #12151d; --carte: #1b2030; --creme: #232838; --creme-2: #1f2433;
    --bleu: #9db8ff; --bleu-2: #7ea2ff; --bleu-pale: #23304f; --vert-pale: #18352a; --vert: #6fd38e; --rouge-pale: #3a1e1e; --rouge: #ff8a80;
    --ambre-pale: #3a2f16; --ambre: #f2c46b; --ombre: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--encre); background: var(--fond); }
a { color: var(--bleu-2); }
h1 { font-size: 1.55rem; line-height: 1.2; margin: .4rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: .2rem 0 .4rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.petit { width: 16px; height: 16px; }
.logo { width: 34px; height: 34px; color: var(--bleu); flex: none; }
.demarrage { min-height: 100vh; display: grid; place-items: center; color: var(--bleu); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }

/* ---------- structure */
.entete { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--fond) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord); }
.marque { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marque b { display: block; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marque small { color: var(--gris); font-size: .78rem; }
.marque.petit .logo { width: 28px; height: 28px; }
main { max-width: 640px; margin: 0 auto; padding: 14px 16px calc(var(--nav) + 28px + env(safe-area-inset-bottom)); }
main:focus { outline: none; }
.onglets { position: fixed; inset: auto 0 0 0; z-index: 6; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--carte); border-top: 1px solid var(--bord); }
.onglets a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--gris); font-size: .78rem; font-weight: 600; }
.onglets a.actif { color: var(--bleu); }
.onglets a.actif .ico { stroke-width: 2.3; }
@media (min-width: 900px) { .onglets { max-width: 640px; margin: 0 auto 16px; border: 1px solid var(--bord); border-radius: 18px; inset: auto 0 0 0; box-shadow: var(--ombre); } }

/* ---------- éléments */
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 16px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 10px; }
.carte-interne { background: var(--creme-2); border: 1px solid var(--bord); border-radius: 10px; padding: 12px; list-style: none; }
.intro { color: var(--gris); margin: 0 0 14px; }
.discret { color: var(--gris); font-size: .88rem; }
.vide { color: var(--gris); text-align: center; }
.aide { color: var(--gris); font-size: .85rem; margin: 4px 0 10px; }
.erreur { color: var(--rouge); background: var(--rouge-pale); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .92rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; touch-action: manipulation; }
.btn.principal { background: var(--bleu); color: #fff; width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.principal { background: #3d68e0; } }
.btn.principal:disabled { opacity: .6; }
.btn.secondaire { background: var(--carte); color: var(--bleu); border-color: var(--bord); }
.btn.lien, .lien, .lien-discret { background: none; border: 0; color: var(--bleu-2); font: inherit; font-weight: 600; padding: 8px 4px; min-height: 40px; cursor: pointer; }
.lien-discret { color: var(--gris); font-size: .85rem; }
.btn.danger, .lien.danger { color: var(--rouge); }
.btn.icone { min-height: 40px; width: 40px; padding: 0; background: var(--carte); border-color: var(--bord); color: var(--encre); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--bleu-2); outline-offset: 2px; }
label { display: block; font-weight: 650; font-size: .92rem; margin: 12px 0 5px; }
input:not([type=checkbox]), textarea { width: 100%; min-height: 48px; padding: 11px 12px; font: inherit; color: var(--encre); background: var(--carte);
  border: 1.5px solid var(--bord); border-radius: 10px; }
textarea { resize: vertical; min-height: 84px; }
input[type=time] { width: auto; min-width: 7.2em; }
.compteur { text-align: right; color: var(--gris); font-size: .8rem; margin: 3px 0 0; }
.interrupteur { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; margin: 6px 0; cursor: pointer; }
.interrupteur input { width: 24px; height: 24px; accent-color: var(--bleu-2); }
.deux { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 420px) { .deux { grid-template-columns: 1fr 1fr; } }

/* ---------- connexion */
.connexion { padding-top: calc(36px + env(safe-area-inset-top)); max-width: 460px; }
.connexion .marque { margin-bottom: 26px; }
.connexion h1 { font-size: 2rem; }
.connexion input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.connexion .btn { margin-top: 8px; }

/* ---------- Mon projet */
.heros { background: linear-gradient(160deg, var(--bleu) 0%, #1c47b8 100%); color: #fff; border: 0; }
.heros h1 { color: #fff; margin-top: 0; }
.heros .sur-titre { margin: 0; opacity: .85; font-size: .9rem; }
.heros .avance { margin: 8px 0 0; opacity: .92; font-size: .92rem; }
.heros .prochaine { background: rgba(255, 255, 255, .13); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.heros .prochaine span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.heros .btn.secondaire { background: #fff; color: #062b8a; border: 0; }
.jauge { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 6px; }
.jauge span { display: block; height: 100%; background: #9ef0b5; border-radius: inherit; transition: width .6s; }
.action { border-left: 5px solid var(--ambre); }
.pastille { display: inline-block; background: var(--ambre-pale); color: var(--ambre); font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; }
.duree { font-weight: 650; }
.etapes { list-style: none; margin: 0; padding: 6px 16px; }
.etapes li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.etapes li:last-child { border: 0; }
.etapes .puce { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bord); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.etapes .fini .puce { background: var(--vert); border-color: var(--vert); color: #fff; }
.etapes .encours .puce { border-color: var(--bleu-2); box-shadow: inset 0 0 0 4px var(--carte), inset 0 0 0 12px var(--bleu-2); }
.etapes small { color: var(--gris); }
.liste { list-style: none; margin: 0; padding: 4px 16px; }
.liste > li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bord); }
.liste > li:last-child { border: 0; }
.liste small { display: block; color: var(--gris); font-size: .82rem; }
.liste .droite { text-align: right; flex: none; max-width: 48%; }
.etat { font-weight: 650; }
.etat.payee, .etat.faite { color: var(--vert); }
.etat.retard, .etat.a_payer { color: var(--rouge); }
.etat.en_cours, .etat.partielle { color: var(--ambre); }
.reponse { background: var(--bleu-pale); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; font-size: .92rem; }
.demandes p { margin: 0; overflow-wrap: anywhere; }
.contact { display: grid; gap: 10px; }

/* ---------- Mon site */
.blocs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bloc { display: grid; grid-template-columns: 1fr auto; text-decoration: none; color: inherit; padding: 14px 16px; }
.bloc .nom { font-weight: 700; }
.bloc .resume { grid-column: 1; color: var(--gris); font-size: .88rem; }
.bloc .fleche { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 1.8rem; color: var(--gris); }
.etat-ouverture { border-radius: 10px; padding: 10px 12px; }
.etat-ouverture.ouvert { background: var(--vert-pale); color: var(--vert); }
.etat-ouverture.ferme { background: var(--creme); }
.actions-bas { display: grid; gap: 10px; margin-top: 18px; }
.retour { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; min-height: 44px; }
.editeur fieldset { border: 1px solid var(--bord); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 10px; background: var(--carte); }
.editeur legend { font-weight: 750; padding: 0 6px; }
.jour .plage { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.sections { display: grid; gap: 12px; }
.ligne-titre { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.plats { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.plat { background: var(--creme-2); border-radius: 10px; padding: 4px 10px 6px; border: 1px solid var(--bord); }
.grille-plat { display: grid; grid-template-columns: 1fr 6.5em; gap: 8px; }
.outils-plat { display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.raccourcis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.fermetures-ed, .photos-ed { padding: 0; display: grid; gap: 10px; }
.photos-ed li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
.photos-ed img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.fichier { width: 100%; margin-top: 8px; }
.apercu { margin: 16px 0; border: 1px dashed var(--bord); border-radius: 12px; padding: 4px 12px 12px; background: var(--creme-2); }
.apercu summary { font-weight: 700; padding: 10px 0; cursor: pointer; }
.barre-publier { position: sticky; bottom: calc(var(--nav) + 8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
  padding: 10px; margin: 0 -10px; background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(8px); border-radius: 14px; }

/* ---------- rendu des blocs (aperçu ; même classes que le site) */
.rendu-site { font-size: .95rem; }
.pilote-annonce { background: var(--ambre-pale); color: var(--ambre); padding: 10px 12px; border-radius: 8px; font-weight: 650; margin: 0; }
.pilote-horaires { width: 100%; border-collapse: collapse; }
.pilote-horaires th, .pilote-horaires td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--bord); font-weight: 500; }
.pilote-horaires th { font-weight: 650; width: 30%; }
.pilote-menu h3 small, .pilote-note { color: var(--gris); font-weight: 400; font-size: .85rem; }
.pilote-menu h4, .pilote-carte h4 { margin: 10px 0 4px; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: var(--gris); }
.pilote-menu ul, .pilote-carte ul, .pilote-fermetures, .pilote-coordonnees { list-style: none; padding: 0; margin: 0; }
.pilote-menu li, .pilote-carte li { display: grid; grid-template-columns: 1fr auto; padding: 5px 0; border-bottom: 1px dotted var(--bord); }
.pilote-desc { grid-column: 1 / -1; color: var(--gris); font-size: .85rem; }
.pilote-prix { font-weight: 700; white-space: nowrap; }
.pilote-formule { font-weight: 650; margin-top: 10px; }
.pilote-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pilote-photos img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.pilote-photos figure { margin: 0; } .pilote-photos figcaption { font-size: .8rem; color: var(--gris); }
.pilote-perime { opacity: .6; }

/* ---------- toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  z-index: 10; max-width: min(92vw, 480px); padding: 12px 16px; border-radius: 12px; font-weight: 650; background: #10331d; color: #fff; transition: .25s; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#toast.erreur { background: #7a1d14; } #toast.info { background: #22304f; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* plages horaires sur une seule ligne, même à 360 px (WebKit élargit les champs « time » par défaut) */
.jour .plage { flex-wrap: nowrap; }
.jour .plage input[type=time] { width: 7.6em; min-width: 0; flex: 0 1 7.6em; padding: 8px; }

/* audit 22/11 : mention des prix, menu périmé, textes légaux */
.pilote-mention { color: var(--gris); font-size: .78rem; margin-top: 8px; }
.alerte-menu { display: block; background: var(--ambre-pale); color: var(--ambre); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; text-decoration: none; }
.texte-legal h2 { font-size: 1rem; margin: 14px 0 4px; } .texte-legal h2:first-child { margin-top: 0; } .texte-legal p { margin: 0 0 6px; }
