/* Panneau de Retooch — CSS maison, sans dépendance.
   Couleurs et polices de la marque : voir marque.css (chargé avant). */
:root {
  --encre-douce: var(--encre-3);
  --fond: #F7F7FA;
  --carte: #FFFFFF;
  --bord: #E6E6EE;
  --vert: #1F7A4D;
  --vert-fond: #E5F4EC;
  --rouge: #A12A2A;
  --rouge-fond: #FBE9E7;
  --rayon: 18px;
  --ombre: 0 1px 2px rgba(11, 15, 26, .04), 0 6px 20px rgba(11, 15, 26, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.5;
  color: var(--encre);
  background: var(--fond);
}

a { color: var(--violet-texte); }
a:hover { color: var(--violet-fonce); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
h1 {
  font-family: var(--police-titres);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 8px 0 18px;
}
h2 { font-size: 1.1rem; margin: 0 0 12px; }

/* --- En-tête -------------------------------------------------------------- */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--bord);
}
.compte { display: flex; align-items: center; gap: 16px; font-size: .9rem; min-width: 0; }
.compte .email { color: var(--encre-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compte form { margin: 0; }
.bouton-lien {
  background: none; border: 0; padding: 4px 0; min-height: 44px; color: var(--encre-2); font: inherit;
  text-decoration: underline; cursor: pointer;
}
.bouton-lien:hover { color: var(--encre); }

/* --- Mise en page ---------------------------------------------------------- */
.contenu { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.contenu.etroit { max-width: 440px; }
.centre { text-align: center; }

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 20px;
  margin: 0 0 18px;
}
.carte.discret { box-shadow: none; background: transparent; }
.carte.alerte { border-color: #F0C0B8; background: var(--rouge-fond); }
.carte.alerte ul { margin: 0; padding-left: 20px; }

.pied { text-align: center; padding: 0 16px 32px; font-size: .85rem; }
.pied a { color: var(--encre-3); }

.texte-legal p { margin: 0 0 10px; line-height: 1.6; }
.texte-legal p:last-child { margin-bottom: 0; }

/* --- Messages ---------------------------------------------------------------- */
.message { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 500; }
.message-ok { background: var(--vert-fond); color: var(--vert); }
.message-erreur { background: var(--rouge-fond); color: var(--rouge); }

/* --- Boutons -------------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer;
  text-decoration: none; min-height: 44px;
}
.bouton:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible, .bouton-lien:focus-visible {
  outline: 3px solid var(--degrade-debut); outline-offset: 2px;
}
.bouton-principal { background: var(--encre); color: #FFFFFF; }
.bouton-principal:hover { background: #232A3B; }
.bouton-principal:disabled { background: #DCDDE5; color: #5A6172; cursor: not-allowed; }
.bouton-secondaire { background: #EDEDF3; color: var(--encre); }
.bouton-secondaire:hover { background: #E2E2EB; }
.bouton-large { width: 100%; margin-top: 8px; min-height: 50px; }
.bouton-geant { width: 100%; font-size: 1.1rem; padding: 16px 20px; min-height: 60px; }
.bouton-icone { width: 22px; height: 21px; flex: none; }

/* --- Formulaires -------------------------------------------------------------- */
.formulaire { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; margin-top: 10px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], textarea {
  font: inherit; font-size: 16px; padding: 12px 16px; width: 100%; min-height: 48px;
  border: 1px solid #CFD2DC; border-radius: 12px; background: #FFFFFF; color: var(--encre);
}
.aide { color: var(--encre-3); font-size: .9rem; margin: 6px 0 0; }

/* --- Panneau ------------------------------------------------------------------ */
.sites { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sites a { padding: 8px 14px; border-radius: 999px; background: #EDEDF3; color: var(--encre); text-decoration: none; }
.sites a[aria-current] { background: var(--encre); color: #FFFFFF; }

.titre-site { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.titre-site h1 { margin: 0; word-break: break-all; }

.pastille-statut {
  display: inline-block; padding: 4px 10px; border-radius: 20px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
}
.statut-ok { background: var(--vert-fond); color: var(--vert); }
.statut-alerte { background: var(--rouge-fond); color: var(--rouge); }
.statut-neutre { background: #EDEDF3; color: var(--encre-2); }

.action-principale form { margin: 0; }
.action-principale .aide { text-align: center; margin-top: 10px; }

.installation summary { cursor: pointer; list-style: none; }
.installation summary::-webkit-details-marker { display: none; }
.installation summary h2 { display: inline; }
.installation summary::after { content: "▾"; float: right; color: var(--encre-3); }
.installation[open] summary::after { content: "▴"; }
.consignes { padding-left: 22px; margin: 14px 0 0; }
.consignes li { margin-bottom: 12px; }
.consignes p { margin: 0 0 8px; }
.ligne-script { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.ligne-script code {
  flex: 1 1 280px; min-width: 0; display: block; padding: 12px 14px; border-radius: 12px;
  background: var(--encre); color: #D9CCFF; overflow-x: auto; white-space: nowrap; user-select: all;
}
.resultat { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; font-weight: 500; }
.resultat .date { font-weight: 400; opacity: .85; font-size: .85rem; }

.vide { color: var(--encre-3); margin: 0; }
.versions { list-style: none; margin: 0; padding: 0; }
.version { padding: 14px 0; border-top: 1px solid var(--bord); }
.version:first-child { border-top: 0; padding-top: 0; }
.version-entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.version-date { font-weight: 700; }
.changements { margin: 8px 0 10px; padding-left: 20px; color: var(--encre-2); }
.version-actions { display: flex; gap: 8px; }
.version-actions form { margin: 0; }

.historique { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.historique li {
  display: grid; grid-template-columns: 90px 1fr; gap: 2px 12px;
  padding: 10px 0; border-top: 1px solid var(--bord);
}
.historique li:first-child { border-top: 0; }
.historique .qui { font-weight: 700; font-size: .85rem; color: var(--encre-3); }
.historique .msg-artisan .qui { color: var(--violet-texte); }
.historique .quand { grid-column: 2; font-size: .8rem; color: var(--encre-3); }

/* --- Offres et abonnement ------------------------------------------------------- */
.contenu.large { max-width: 980px; }
.liens-compte { display: flex; gap: 16px; }
.liens-compte a { color: var(--encre-2); text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.liens-compte a:hover { color: var(--encre); text-decoration: underline; }
.pied a + a { margin-left: 18px; }

.bandeau-offre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  margin: 0 0 18px; padding: 10px 16px; border-radius: 14px;
  background: var(--violet-pale); color: var(--violet-fonce); font-size: .92rem;
}
.bandeau-offre p { margin: 0; }
.bandeau-offre a { font-weight: 600; }
.bandeau-offre-limite { background: var(--rouge-fond); color: var(--rouge); }
.bandeau-essai { background: var(--violet-pale); border-color: var(--violet-bord); color: var(--violet-fonce); }
.retour-sites { margin: 0 0 6px; }
.retour-sites a { text-decoration: none; font-weight: 500; }
.compteur-sites { color: var(--encre-3); font-weight: 600; }

.champ-et-bouton { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.champ-et-bouton input { flex: 1 1 220px; width: auto; }
.champ-et-bouton .bouton { min-height: 48px; }
.numeros { list-style: none; margin: 12px 0 0; padding: 0; }
.numeros li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 0; border-top: 1px solid var(--bord); font-variant-numeric: tabular-nums; font-weight: 600; }
.numeros li:first-child { border-top: 0; }
.numeros form { margin: 0; }
.ajout-numero { margin-top: 8px; }
.version-bientot { color: var(--encre-3); }
.canal-whatsapp { color: #128C4A; font-weight: 600; }

.espace-haut { margin-top: 22px; }
.bouton-danger { background: var(--rouge-fond); color: var(--rouge); }
.bouton-danger:hover { background: #F6D6D1; }

.offre-nom { font-family: var(--police-titres); font-weight: 700; font-size: 1.4rem; margin: 0 0 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.offre-actuelle form { margin: 14px 0 0; }
.choix-abonnement fieldset { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.choix-abonnement legend { font-weight: 600; margin-bottom: 4px; }
.choix-abonnement label { font-weight: 400; margin: 0; display: flex; gap: 10px; align-items: center; min-height: 44px; }
.liste-coches, .liste-bientot { margin: 0; padding-left: 20px; }
.liste-coches li, .liste-bientot li { margin-bottom: 6px; }
.pastille-bientot { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--violet-pale); color: var(--violet-fonce); font-size: .75rem; font-weight: 700; }

.tableau-sites-carte { padding: 8px 20px; overflow-x: auto; }
.tableau-sites { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau-sites th { text-align: left; font-size: .8rem; color: var(--encre-3); font-weight: 600; padding: 10px 8px; }
.tableau-sites td { padding: 12px 8px; border-top: 1px solid var(--bord); vertical-align: top; }
.tableau-sites td a { font-weight: 600; word-break: break-all; }
.site-en-trop td { opacity: .65; }

.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.texte-libre { white-space: pre-wrap; margin: 8px 0 0; }
.texte-legal ul { margin: 0 0 10px; padding-left: 20px; }

/* --- Téléphone ------------------------------------------------------------------- */
@media (max-width: 640px) {
  .entete { padding: 8px 12px; }
  .compte .email { display: none; }
  .contenu { padding: 20px 12px 40px; }
  .carte { padding: 16px; }
  .historique li { grid-template-columns: 1fr; }
  .historique .quand { grid-column: 1; }
  .liens-compte { gap: 12px; }
  .tableau-sites thead { display: none; }
  .tableau-sites tr { display: block; padding: 10px 0; border-top: 1px solid var(--bord); }
  .tableau-sites tr:first-child { border-top: 0; }
  .tableau-sites td { display: block; border: 0; padding: 3px 0; }
  .tableau-sites td::before { content: attr(data-titre) " : "; color: var(--encre-3); font-size: .8rem; }
  .tableau-sites td:first-child::before { content: none; }
}
