/* Le cockpit des agences : un seul style, celui de la maquette validée. */

:root {
  /* Les couleurs du cockpit d'Amanda (v1) : prune sombre, rose vif, doré pour ce qui est fait. */
  --fond: #160E1B;
  --carte: #211527;
  --carte-2: #2B1A33;
  --encre: #F6EEF2;
  --doux: #A991B0;
  --trait: #3A2743;
  --champ: #1B1121;
  --accent: #FF6E8A;
  --accent-fond: #ff6e8a22;
  --fait: #E7B860;
  --fait-fond: #e7b8601f;
  --ok: #8FD9A8;
  --ok-fond: #8fd9a81f;
  --alerte: #E7B860;
  --alerte-fond: #e7b8601f;
  --erreur: #FF8A80;
  --erreur-fond: #ff8a8022;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 15px/1.45 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(env(safe-area-inset-bottom) + 104px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

h1 { margin: 0; font-family: "Bricolage Grotesque", Inter, sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { margin: 16px 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
p { margin: 0; }

.surtitre { font-size: 13px; font-weight: 600; color: var(--doux); }
.doux { color: var(--doux); font-size: 13px; }

.carte {
  background: var(--carte);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

a { color: var(--accent); }

.bouton, .bouton-sec, .bouton-lien {
  font: inherit;
  font-weight: 700;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bouton { background: var(--accent); color: #FFFFFF; border: 0; font-family: "Bricolage Grotesque", Inter, sans-serif; }
.bouton-sec { background: var(--carte); color: var(--accent); border: 1px solid var(--trait); }
.bouton-lien { background: transparent; color: var(--accent); border: 0; min-height: 44px; padding: 0 4px; }
.bouton:disabled { opacity: .5; cursor: default; }
.petit { min-height: 36px; font-size: 13px; padding: 0 12px; border-radius: 999px; }

.puce { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.puce.ok { background: var(--ok-fond); color: var(--ok); }
.puce.alerte { background: var(--alerte-fond); color: var(--alerte); }
.puce.neutre { background: var(--carte-2); color: var(--doux); }

.modele {
  background: var(--carte);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--encre);
  min-height: 72px;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-fond); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex: none;
}

label { font-size: 13px; font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  font: inherit;
  width: 100%;
  border: 1px solid var(--trait);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--champ); color: var(--encre);
  color: var(--encre);
  min-height: 46px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, .bouton:focus-visible, .bouton-sec:focus-visible, .bouton-lien:focus-visible, .modele:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.champ { display: flex; flex-direction: column; gap: 6px; }
.aide { font-size: 12px; color: var(--doux); font-weight: 500; }

.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.interrupteur input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }

.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--carte-2); color: var(--encre);
  font-size: 13px; font-weight: 600;
  padding: 4px 4px 4px 10px; border-radius: 999px;
}
.etiquette button {
  font: inherit; border: 0; background: transparent; color: var(--doux);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
}

.sous-carte { border: 1px solid var(--trait); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.retour { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; text-decoration: none; align-self: flex-start; }

.encadre { border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.encadre.alerte { background: var(--alerte-fond); color: var(--fait); }
.encadre.erreur { background: var(--erreur-fond); color: var(--erreur); }
.encadre.ok { background: var(--ok-fond); color: var(--ok); }

.lien-copie { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; background: var(--champ); padding: 10px; border-radius: 10px; }

#etat {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--encre); color: var(--fond);
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
#etat.visible { opacity: 1; }
#etat.erreur { background: var(--erreur); }

.centre { align-self: center; margin-top: 24px; }
.gauche { align-self: flex-start; }
.etire { flex: 1; }
.serre { gap: 8px; }
input.nombre { width: 88px; flex: none; text-align: center; }

/* Accueil sans compte */
.bienvenue { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.titre-bienvenue { font-size: 44px; }
.grand { min-height: 56px; font-size: 16px; }
.carte .ligne label { flex: 1; }
input[readonly] { background: var(--carte-2); color: var(--doux); }

/* Semaine, contenus, thèmes */
.puce.accent { background: var(--accent-fond); color: var(--accent); }
/* Les onglets, en bas de l'écran comme dans le cockpit d'Amanda : icône, puis nom. */
.onglets {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  max-width: 560px; margin: 0 auto; display: flex; gap: 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  background: rgba(22, 14, 27, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--trait);
  padding: 8px 6px calc(env(safe-area-inset-bottom) + 8px);
}
.onglets::-webkit-scrollbar { display: none; }
.onglets a {
  flex: 0 0 auto; min-width: 62px; padding: 6px 7px; border-radius: 12px;
  text-align: center; text-decoration: none; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: var(--doux);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.onglets .icone { font-size: 19px; line-height: 1; }
.onglets a[aria-current=page] { color: var(--encre); }
.onglets a[aria-current=page] .icone { filter: drop-shadow(0 0 8px var(--accent)); }
.semaine strong { flex: 1; text-align: center; }
.semaine .bouton-sec { min-width: 44px; min-height: 44px; font-size: 20px; padding: 0; }
.titre-contenu { font-weight: 700; font-size: 16px; color: var(--encre); text-decoration: none; }
a.titre-contenu:hover { color: var(--accent); }
.lien-carte { text-decoration: none; color: var(--encre); }
.estompee { opacity: .55; }
.progression progress { width: 100%; height: 8px; accent-color: var(--accent); }
.etiquette-champ { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.texte-script { white-space: pre-wrap; }
.raison {
  display: flex; align-items: center; gap: 12px; font-weight: 600;
  border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; min-height: 48px;
}
.raison input { width: 20px; height: 20px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; }
.masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ligne.deux > * { flex: 1; min-width: 0; }
input[type=date], input[type=time] { font: inherit; width: 100%; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; min-height: 46px; background: var(--champ); color: var(--encre); }
textarea:disabled, input:disabled, select:disabled { background: var(--carte-2); color: var(--doux); }

/* Import depuis un tableur */
input[type=file] { font: inherit; font-size: 14px; min-height: 44px; }
.apercu { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; max-height: 280px; overflow-y: auto; }
.liste-erreurs { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* Administration */
.montant { font-size: 18px; font-variant-numeric: tabular-nums; }

/* Envois */
.choix-fichiers { position: absolute; width: 1px; height: 1px; opacity: 0; }
.envois { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.envoi { background: var(--carte); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.envoi progress { width: 100%; height: 8px; accent-color: var(--accent); }
.nom-fichier { font-weight: 700; overflow-wrap: anywhere; }

/* Logo */
.logo-accueil { width: 72px; height: 72px; }

/* Guide du Drive */
.etapes { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.aide-depannage { font-size: 14px; }
.aide-depannage summary { font-weight: 700; color: var(--accent); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.aide-depannage ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }

/* Pages de texte (présentation, confidentialité) */
.page-texte { gap: 14px; padding-bottom: 48px; }
.page-texte h2 { margin-top: 24px; font-size: 14px; }
.page-texte ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.page-texte p, .page-texte li { font-size: 15px; line-height: 1.55; }
.chapeau { font-size: 17px !important; color: var(--encre); }
.pied-page-texte { margin-top: 32px; font-size: 13px !important; color: var(--doux); text-align: center; }
.liens-bas { display: flex; justify-content: center; gap: 12px; font-size: 13px; margin-top: 8px; }

/* Boîte à liens */
.lien { gap: 4px; }
.lien .adresse { overflow-wrap: anywhere; font-size: 13px; }
.puces-choix { display: flex; flex-wrap: wrap; gap: 8px; }
/* Tournage */
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.case input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--accent); }
.ligne-tournage { display: flex; gap: 8px; align-items: center; }
.ligne-tournage input[type=text] { flex: 1; min-width: 0; }
.ligne-tournage input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }
/* Abonnement */
.avantages { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.carte.accent { border: 2px solid var(--accent); }
.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.texte-erreur { color: var(--erreur); }
.petit-texte { font-size: 13px; }

/* Thème de la v1 : titres, bandeau de la semaine, cartes */
h2, .titre-bienvenue, strong.titre-contenu { font-family: "Bricolage Grotesque", Inter, sans-serif; }
.date-semaine { font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.date-semaine span { text-transform: none; letter-spacing: 0; }
.carte { border: 1px solid var(--trait); }
.carte.accent { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-fond); }
.progression progress, .carte progress { accent-color: var(--fait); width: 100%; height: 8px; }
.case input, .ligne-tournage input[type=checkbox], input.coche { accent-color: var(--fait); }
.encadre { background: var(--carte-2); }

/* Planning de posts */
.post.fait { opacity: .5; }
input.coche { width: 28px; height: 28px; flex: 0 0 auto; }
.texte-post { display: flex; flex-direction: column; gap: 8px; background: var(--champ); border: 1px solid var(--trait); border-radius: 11px; padding: 10px 12px; }
.texte-post .bouton-sec { align-self: flex-end; }
.plateforme { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 9px; background: var(--carte-2); color: var(--encre); white-space: nowrap; }
.pf-mym, .pf-onlyfans, .pf-fansly { background: var(--accent); color: #160E1B; }
.pf-x { background: #E8E3EA; color: #160E1B; }
.pf-reddit { background: #FF5722; color: #160E1B; }
.pf-telegram { background: #37A7E0; color: #160E1B; }
.pf-tiktok { background: #25E7DE; color: #160E1B; }
.pf-facebook { background: #4C8DF6; color: #160E1B; }
.pf-youtube { background: #FF3B5C; color: #160E1B; }
