/* Design system V2 « Simple » — référence : maquettes V2 (Apple × Canva).
   Un seul accent, beaucoup d'air, le contenu des écrans au centre. */

@font-face { font-family: Inter; src: url("/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --fond: #F5F5F7;
  --surface: #FFFFFF;
  --encre: #1D1D1F;
  --encre-2: #6E6E73;
  --separateur: #E5E5EA;
  --chevron: #C7C7CC;
  --accent: #C93D1F;
  --accent-fonce: #9E2F17;
  --accent-doux: #FCEBE6;
  --ok: #248A3D;
  --ok-doux: #E7F4EA;
  --attention: #B25000;
  --attention-doux: #FFF1E0;
  --rayon: 16px;
  --rayon-l: 20px;
  --rayon-bouton: 14px;
  --police: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --voile: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.1) 45%, rgba(0,0,0,.72) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 var(--police); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-fonce); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barre du haut ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 40px; background: var(--surface); border-bottom: 1px solid var(--separateur); position: sticky; top: 0; z-index: 10; }
.topbar__gauche, .topbar__droite { display: flex; align-items: center; gap: 16px; }
.marque { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--encre); text-decoration: none; }
.lieu { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 100px; background: var(--fond); font-size: 15px; font-weight: 500; color: var(--encre); }
.onglets { display: flex; gap: 4px; }
.onglet { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 100px; color: var(--encre-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.onglet:hover { color: var(--encre); background: var(--fond); }
.onglet[aria-current="page"] { background: var(--fond); color: var(--encre); font-weight: 600; }
.lien-discret { color: var(--encre-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--encre); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.avatar:hover { color: #fff; }

/* Barre d'onglets mobile (en bas) */
.onglets-mobiles { display: none; }

/* ---------- Mise en page ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 48px 40px 80px; display: flex; flex-direction: column; gap: 40px; }
.entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.entete__textes { display: flex; flex-direction: column; gap: 8px; }
.titre-1 { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.titre-2 { font-size: 26px; font-weight: 700; }
.titre-3 { font-size: 20px; font-weight: 700; }
.sous-titre { font-size: 18px; color: var(--encre-2); }
.legende { font-size: 14px; color: var(--encre-2); }
.resume { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--encre-2); }
.section { display: flex; flex-direction: column; gap: 20px; }
.section__entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--rayon-bouton); font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn--principal { background: var(--accent); color: #fff; }
.btn--principal:hover { background: var(--accent-fonce); color: #fff; }
.btn--secondaire { background: var(--surface); color: var(--encre); box-shadow: inset 0 0 0 1px var(--separateur); }
.btn--secondaire:hover { color: var(--encre); background: #FAFAFA; }
.btn--gris { background: var(--fond); color: var(--encre); }
.btn--gris:hover { color: var(--encre); background: #ECECEF; }
.btn--lien { background: none; color: var(--accent); padding: 0 4px; min-height: 44px; }
.btn--danger { background: none; color: var(--accent); padding: 0; min-height: 44px; font-weight: 500; }
.btn--petit { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 100px; }
.btn--plein { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ---------- Pastilles d'état ---------- */
.point { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.point--ok { background: var(--ok); }
.point--attention { background: var(--attention); }
.point--neutre { background: var(--chevron); }
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; background: rgba(255,255,255,.94); color: var(--encre); font-size: 13px; font-weight: 600; }

/* ---------- Vignette d'écran (style Photos) ---------- */
.grille-ecrans { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.ecran { display: flex; flex-direction: column; gap: 14px; color: var(--encre); text-decoration: none; }
.ecran:hover { color: var(--encre); }
.ecran:hover .visuel { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.visuel { position: relative; aspect-ratio: 16 / 9; border-radius: var(--rayon-l); overflow: hidden; background: #2B2B2E; color: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.visuel--portrait { aspect-ratio: 9 / 16; max-height: 420px; margin: 0 auto; }
.visuel > img, .visuel > video, .visuel > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.visuel__voile { position: absolute; inset: 0; background: var(--voile); }
.visuel__pastille { position: absolute; top: 16px; left: 16px; }
.visuel__texte { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.visuel__titre { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.visuel__sous { font-size: 15px; font-weight: 500; }
.visuel--vide { background: var(--surface); color: var(--encre-2); box-shadow: inset 0 0 0 1.5px var(--separateur); display: grid; place-items: center; text-align: center; padding: 24px; }
.visuel__icone { font-size: 15px; font-weight: 500; }
.ecran__legende { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.ecran__nom { font-size: 19px; font-weight: 600; }
.ecran__info { font-size: 15px; color: var(--encre-2); }

/* Carte « ajouter » */
.ajouter { aspect-ratio: 16 / 9; border-radius: var(--rayon-l); border: 1.5px dashed var(--chevron); display: grid; place-items: center; text-align: center; color: var(--encre-2); text-decoration: none; font-weight: 600; background: transparent; }
.ajouter:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Cartes génériques ---------- */
.carte { background: var(--surface); border-radius: var(--rayon-l); padding: 24px; }
.grille-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 20px; }
.modele { display: flex; flex-direction: column; gap: 10px; color: var(--encre); text-decoration: none; }
.modele .visuel { aspect-ratio: 16 / 10; border-radius: var(--rayon); }
.modele__nom { font-size: 16px; font-weight: 600; }
.modele__info { font-size: 14px; color: var(--encre-2); }

/* ---------- Listes groupées (style Réglages) ---------- */
.groupe { display: flex; flex-direction: column; gap: 6px; }
.groupe__titre { padding: 0 16px; font-size: 13px; color: var(--encre-2); text-transform: uppercase; letter-spacing: .02em; }
.groupe__pied { padding: 0 16px; font-size: 13px; color: var(--encre-2); }
.liste { background: var(--surface); border-radius: 12px; overflow: hidden; }
.ligne { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; color: var(--encre); text-decoration: none; border: 0; background: none; font: inherit; width: 100%; text-align: left; }
.ligne + .ligne, .liste > form + .ligne, .liste > form + form .ligne, .liste > .ligne + form .ligne { border-top: 1px solid var(--separateur); }
.ligne__libelle { flex: 1; }
.ligne__valeur { color: var(--encre-2); }
.ligne__chevron { color: var(--chevron); font-size: 20px; line-height: 1; }
a.ligne:hover, button.ligne:hover { background: #FAFAFA; color: var(--encre); }
.ligne--danger { color: var(--accent); }

/* ---------- Formulaires ---------- */
.champ { display: flex; flex-direction: column; gap: 8px; }
.champ__libelle { font-size: 14px; font-weight: 600; color: var(--encre-2); }
.saisie, .champ input:not([type=checkbox]):not([type=radio]), .champ select, .champ textarea {
  min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--fond); font: inherit; font-size: 17px; color: var(--encre); width: 100%;
}
.champ textarea { padding: 12px 14px; min-height: 96px; }
.case { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.case input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Messages ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; }
.message { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: var(--surface); font-size: 15px; }
.message--success { background: var(--ok-doux); color: #14532D; }
.message--error, .message--danger { background: var(--accent-doux); color: var(--accent-fonce); }
.message--warning, .message--info { background: var(--attention-doux); color: #7A3700; }

/* ---------- État vide ---------- */
.vide { background: var(--surface); border-radius: var(--rayon-l); padding: 48px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.vide p { color: var(--encre-2); max-width: 520px; }
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; width: 100%; max-width: 760px; margin: 8px 0; text-align: left; }
.etape { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--fond); font-size: 15px; }
.etape__num { width: 28px; height: 28px; border-radius: 14px; background: var(--encre); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; }

/* ---------- Éditeur d'écran ---------- */
.editeur-barre { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 32px; background: var(--surface); border-bottom: 1px solid var(--separateur); }
.editeur-barre__centre { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.editeur { display: grid; grid-template-columns: 320px minmax(0, 1fr) 340px; min-height: calc(100vh - 66px); }
.panneau { background: var(--surface); padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.panneau--gauche { border-right: 1px solid var(--separateur); }
.panneau--droit { border-left: 1px solid var(--separateur); padding: 24px; gap: 20px; }
.panneau__entete { padding: 0 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.scene { padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.tele { width: 100%; max-width: 820px; padding: 10px; border-radius: 22px; background: #141416; }
.tele .visuel { border-radius: 14px; }
.tele--portrait { max-width: 360px; }
.diapo { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; color: var(--encre); text-decoration: none; }
.diapo:hover { background: var(--fond); color: var(--encre); }
.diapo[aria-current="true"] { background: var(--accent-doux); }
.diapo__mini { width: 104px; height: 58px; border-radius: 8px; flex: none; overflow: hidden; background: #2B2B2E; position: relative; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.diapo__mini img, .diapo__mini video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.diapo__textes { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.diapo__nom { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diapo__info { font-size: 13px; color: var(--encre-2); }
.groupe-diapos { padding: 12px 8px 4px; font-size: 13px; font-weight: 600; color: var(--encre-2); }
.puces { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.puce { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 100px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--separateur); font-size: 15px; font-weight: 500; color: var(--encre); text-decoration: none; }
.puce--active { background: var(--encre); color: #fff; box-shadow: none; }
.actions-ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.duree { display: flex; flex-wrap: wrap; gap: 8px; }
.duree button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 100px; background: var(--fond); font: inherit; font-size: 15px; font-weight: 500; color: var(--encre); cursor: pointer; }
.duree button[aria-pressed="true"] { background: var(--encre); color: #fff; }

/* ---------- Connexion ---------- */
.connexion { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.connexion__visuel { position: relative; overflow: hidden; background: #2B2B2E; color: #fff; }
.connexion__visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.connexion__citation { position: absolute; left: 48px; right: 48px; bottom: 48px; display: flex; flex-direction: column; gap: 8px; }
.connexion__citation strong { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.connexion__form { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: var(--surface); }
.connexion__boite { width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .editeur { grid-template-columns: 1fr; }
  .panneau--gauche { border-right: 0; border-bottom: 1px solid var(--separateur); max-height: none; }
  .panneau--droit { border-left: 0; border-top: 1px solid var(--separateur); }
  .scene { order: -1; padding: 20px 16px; }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .topbar .onglets, .topbar .lien-discret { display: none; }
  .page { padding: 24px 16px 120px; gap: 28px; }
  .titre-1 { font-size: 34px; }
  .grille-ecrans { grid-template-columns: 1fr; gap: 22px; }
  .entete .btn { width: 100%; }
  .onglets-mobiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--separateur); }
  .onglets-mobiles a { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--encre-2); text-decoration: none; }
  .onglets-mobiles a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .editeur-barre { padding: 10px 16px; }
  .connexion { grid-template-columns: 1fr; }
  .connexion__visuel { display: none; }
  .connexion__form { padding: 32px 20px; }
}

/* ---------- Planning : frise d'une journée, une ligne par écran ---------- */
.frise { background: var(--surface); border-radius: var(--rayon-l); padding: 20px 24px 8px; display: flex; flex-direction: column; }
.frise__graduations { position: relative; height: 20px; margin: 0 0 4px; font-size: 12px; color: var(--encre-2); }
.frise__graduations span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.frise__graduations span:first-child { transform: none; }
.frise__graduations span:last-child { transform: translateX(-100%); }
.frise__ecran { padding: 16px 0; border-top: 1px solid var(--separateur); display: flex; flex-direction: column; gap: 10px; }
.frise__entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.frise__entete > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.frise__nom { font-size: 17px; font-weight: 600; color: var(--encre); text-decoration: none; }
.frise__nom:hover { color: var(--accent); }
.frise__pistes { position: relative; display: flex; flex-direction: column; gap: 6px; background: repeating-linear-gradient(90deg, var(--separateur) 0 1px, transparent 1px calc(100% / 8)); border-radius: 8px; padding: 4px 0; }
.frise__piste { position: relative; height: 34px; }
.frise__piste--vide { display: flex; align-items: center; padding-left: 8px; }
.frise__barre { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 8px; background: var(--accent-doux); color: var(--accent-fonce); font-size: 13px; font-weight: 600; text-decoration: none; display: flex; align-items: center; padding: 0 10px; overflow: hidden; box-sizing: border-box; }
.frise__barre span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frise__barre:hover { color: var(--accent-fonce); box-shadow: inset 0 0 0 2px var(--accent); }
.frise__barre--permanent { background: #ECECEF; color: var(--encre); }
.frise__barre--permanent:hover { color: var(--encre); box-shadow: inset 0 0 0 2px var(--encre-2); }
.frise__barre--en-cours { background: var(--accent); color: #fff; }
.frise__barre--en-cours:hover { color: #fff; }
.frise__maintenant { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--encre); z-index: 2; border-radius: 1px; }
.frise__repere { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #fff; background: var(--encre); border-radius: 100px; padding: 1px 8px; white-space: nowrap; z-index: 1; }
@media (max-width: 760px) {
  .frise { padding: 16px 12px 4px; }
  .frise__barre { font-size: 12px; padding: 0 6px; }
}

/* ---------- Abonnement : bandeau et cartes de formules (compte et page d'accueil) ---------- */
.bandeau-abonnement { justify-content: space-between; flex-wrap: wrap; }
.periodicite { display: inline-flex; padding: 4px; border-radius: 100px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--separateur); }
.periodicite label { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 100px; font-size: 15px; font-weight: 600; color: var(--encre-2); cursor: pointer; }
.periodicite input { position: absolute; opacity: 0; pointer-events: none; }
.periodicite label:has(input:checked) { background: var(--encre); color: #fff; }
.periodicite label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.periodicite__remise { font-size: 12px; font-weight: 700; color: var(--ok); }
.periodicite label:has(input:checked) .periodicite__remise { color: #9BE2AE; }
.offres { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.offre { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: var(--rayon-l); background: var(--surface); box-shadow: inset 0 0 0 1px var(--separateur); }
.offre--conseillee { box-shadow: inset 0 0 0 2px var(--accent); }
.offre__badge { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 100px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.offre__nom { font-size: 22px; font-weight: 700; }
.offre__prix { display: flex; align-items: baseline; gap: 6px; }
.offre__montant { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.offre__unite { color: var(--encre-2); font-size: 15px; }
.offre__note { font-size: 14px; color: var(--encre-2); min-height: 20px; }
.offre__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; flex: 1; }
.offre__points li { display: flex; gap: 10px; }
.offre__points li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--ok-doux) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%23248A3D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.offre__points li.offre__intro { font-weight: 600; }
.offre__points li.offre__intro::before { display: none; }
/* Les prix mensuels et annuels sont tous dans la page : le sélecteur choisit lesquels montrer. */
.tarifs:has(input[value="annuel"]:checked) [data-periodicite="mensuel"],
.tarifs:has(input[value="mensuel"]:checked) [data-periodicite="annuel"] { display: none; }
