/* =========================================================================
   admin.css — composants partagés de l'administration Mots Croisés.

   Les valeurs viennent des blocs <style> qui étaient recopiés dans chaque
   page admin (~90 lignes identiques dans 5 fichiers, plus deux variantes).
   Elles n'ont pas changé : elles vivent maintenant à un seul endroit.

   Pour l'instant seul admin_articles.php s'appuie dessus ; les autres pages
   gardent leur <style> en ligne jusqu'à leur migration.
   ========================================================================= */

:root {
  --vert: #69b56b;
  --vert-fonce: #58a35b;
  --vert-teinte: #69b56b22;
  --sarcelle: #45a3aa;
  --sarcelle-fonce: #3a8f96;
  --sarcelle-clair: #e0f0f1;
  --danger: #d9534f;
  --danger-fonce: #c0302c;
  --fond: #f6f9f6;
  --fond-doux: #f9fdf9;
  --bord: #e5e5e5;
  --bord-champ: #ccc;
  --texte: #333;
  --attenue: #888;
  --ombre-carte: 0 1px 4px rgba(0, 0, 0, 0.08);
  --ombre-bloc: 0 2px 10px rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--fond);
  color: var(--texte);
  -webkit-font-smoothing: antialiased;
}

/* ===================== En-tête et navigation ===================== */

.adm-header {
  background: white;
  border-bottom: 4px solid var(--vert);
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.adm-header h1 {
  color: var(--sarcelle);
  font-size: 1.4em;
  margin: 0;
}

.adm-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.adm-nav a {
  text-decoration: none;
  color: var(--sarcelle);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 7px;
  line-height: 1;
}

.adm-nav a:hover {
  background: var(--sarcelle-clair);
}

.adm-nav a[aria-current="page"] {
  background: var(--sarcelle);
  color: white;
}

.adm-nav .sep {
  width: 1px;
  height: 18px;
  background: var(--bord);
  margin: 0 6px;
}

.adm-nav a.sortie {
  color: var(--attenue);
}

.adm-nav a.sortie:hover {
  background: #fceaea;
  color: var(--danger-fonce);
}

/* Bouton du menu : masqué tant qu'on n'est pas à l'étroit. */
.adm-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--sarcelle);
  cursor: pointer;
  padding: 0;
}

.adm-burger:hover {
  background: var(--sarcelle-clair);
}

.adm-burger svg {
  width: 22px;
  height: 22px;
}

/* ===================== Ossature ===================== */

.adm-wrap {
  max-width: 1140px;
  margin: 22px auto;
  padding: 0 16px;
}

.adm-wrap--large {
  max-width: 1240px;
}

.bloc {
  background: white;
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--ombre-bloc);
}

.bloc--plat {
  padding: 0;
  border: 1px solid var(--bord);
  overflow: hidden;
}

.bloc-titre {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sarcelle);
  padding: 14px 16px 0;
  margin: 0;
}

.bloc-corps {
  padding: 16px;
}

footer.adm-pied {
  text-align: center;
  color: var(--attenue);
  margin: 2em 0;
  font-size: 0.9em;
}

/* ===================== Bandeaux ===================== */

/* Collants : avant, ils s'affichaient en haut de <main> et un enregistrement
   lancé depuis le bas de page ne montrait jamais son résultat. */
.bandeau {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0.85em 1em;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  position: sticky;
  top: 0;
  z-index: 15;
}

.bandeau svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}

.bandeau--ok {
  background: #e9f8ea;
  border-left: 5px solid var(--vert);
  color: #2f6330;
}

.bandeau--err {
  background: #fceaea;
  border-left: 5px solid var(--danger);
  color: #741c1c;
}

.bandeau--avert {
  background: #fdf6e3;
  border-left: 5px solid #d9a441;
  color: #7a5a12;
}

.bandeau .fermer {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

.bandeau .fermer:hover {
  opacity: 1;
}

/* ===================== Boutons ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--vert);
  color: white;
  border: none;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover {
  background: var(--vert-fonce);
}

.btn--fantome {
  background: white;
  color: var(--sarcelle);
  border: 1px solid var(--bord-champ);
}

.btn--fantome:hover {
  background: var(--sarcelle-clair);
  border-color: var(--sarcelle);
}

.btn--danger {
  background: var(--danger);
}

.btn--danger:hover {
  background: var(--danger-fonce);
}

.btn--petit {
  padding: 0.35em 0.8em;
  border-radius: 6px;
  font-size: 12.5px;
}

.btn[disabled] {
  background: #cfd8cf;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ===================== Champs ===================== */

.champ {
  margin-bottom: 14px;
}

.champ:last-child {
  margin-bottom: 0;
}

.champ > label {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 4px;
}

.champ > label .doux {
  font-weight: 400;
  color: var(--attenue);
}

.saisie {
  width: 100%;
  padding: 0.55em 0.65em;
  border: 1px solid var(--bord-champ);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: white;
  color: var(--texte);
}

.saisie:focus {
  outline: none;
  border-color: var(--vert);
  box-shadow: 0 0 0 3px var(--vert-teinte);
}

.saisie--fige {
  background: #f4f7f4;
  color: #6b7a6b;
}

.aide {
  font-size: 11.5px;
  color: var(--attenue);
  margin-top: 4px;
  line-height: 1.45;
}

.compteur {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--attenue);
  margin-top: 4px;
}

.compteur .court {
  color: #b9820f;
  font-weight: 600;
}

/* ===================== En-tête de liste et barre d'outils ===================== */

.entete-liste {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.entete-liste h2 {
  color: var(--vert);
  margin: 0;
  font-size: 1.3em;
  border-bottom: 2px solid var(--vert-teinte);
  padding-bottom: 0.3em;
  flex: 1;
}

.compte {
  font-size: 13px;
  color: var(--attenue);
}

.barre {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--bord);
}

.recherche {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.recherche svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9bb09b;
  pointer-events: none;
}

.recherche input {
  width: 100%;
  padding: 0.55em 0.7em 0.55em 34px;
  border: 1px solid var(--bord-champ);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--texte);
}

.recherche input:focus {
  outline: none;
  border-color: var(--vert);
  box-shadow: 0 0 0 3px var(--vert-teinte);
}

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--sarcelle);
  border: 1px solid var(--bord-champ);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.pastille svg {
  width: 13px;
  height: 13px;
}

.pastille[aria-pressed="true"] {
  background: var(--sarcelle);
  border-color: var(--sarcelle);
  color: white;
}

.tri {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--attenue);
  display: flex;
  align-items: center;
  gap: 7px;
}

.tri select {
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 8px;
  border: 1px solid var(--bord-champ);
  border-radius: 6px;
  background: white;
  color: var(--texte);
}

/* ===================== Lignes de liste ===================== */

/* La ligne reste en place quand elle se déplie : avant, la carte cliquée
   était masquée et la grille se réorganisait sous les yeux. */
.ligne {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: white;
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.ligne:hover {
  box-shadow: var(--ombre-carte);
  border-color: #d3e6d3;
}

.ligne:focus-visible {
  outline: 2px solid var(--vert);
  outline-offset: 2px;
}

.ligne[aria-expanded="true"] {
  border-color: var(--vert);
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.ligne .vignette {
  width: 54px;
  height: 40px;
  border-radius: 6px;
  background: var(--fond-doux);
  border: 1px solid var(--bord);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3d3c3;
  overflow: hidden;
}

.ligne .vignette img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ligne .vignette svg {
  width: 18px;
  height: 18px;
}

.ligne .titre {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ligne .chevron {
  color: #aaa;
  flex: none;
  display: flex;
  transition: transform 0.15s;
}

.ligne[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
  color: var(--vert);
}

.ligne .actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.tiroir {
  background: var(--fond-doux);
  border: 1px solid var(--vert);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 18px;
  margin-bottom: 8px;
}

.tiroir[hidden] {
  display: none;
}

.tiroir-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tiroir-pied {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e0ece0;
}

/* ===================== Badges ===================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: white;
  padding: 3px 9px;
  border-radius: 12px;
  line-height: 1.4;
  flex: none;
}

.badge svg {
  width: 11px;
  height: 11px;
}

.badge--pdf {
  background: var(--sarcelle);
}

.badge--article {
  background: var(--vert);
}

/* ===================== États vides ===================== */

.vide {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--bord);
  border-radius: 12px;
  background: white;
  color: var(--attenue);
}

.vide svg {
  width: 34px;
  height: 34px;
  color: #cbd9cb;
}

.vide h3 {
  margin: 10px 0 4px;
  font-size: 15px;
  color: var(--texte);
}

.vide p {
  margin: 0 0 14px;
  font-size: 13px;
}

/* ===================== Dialogue ===================== */

dialog.dlg {
  border: 1px solid var(--bord);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  padding: 22px;
  width: min(420px, calc(100vw - 32px));
  color: var(--texte);
  font-family: inherit;
}

dialog.dlg::backdrop {
  background: rgba(27, 59, 63, 0.35);
}

dialog.dlg h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

dialog.dlg p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: #5a6a5a;
  line-height: 1.55;
}

dialog.dlg .cite {
  font-weight: 600;
  color: var(--texte);
}

.dlg-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ===================== Écran d'édition ===================== */

.fil {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.fil .retour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sarcelle);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--bord);
}

.fil .retour:hover {
  background: var(--sarcelle-clair);
  border-color: var(--sarcelle);
}

.fil .retour svg {
  width: 14px;
  height: 14px;
}

.fil h2 {
  margin: 0;
  font-size: 1.15em;
  color: var(--texte);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.colonnes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

/* --- Choix du type, à la création --- */
.choix-type {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.choix-type label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--bord-champ);
  border-radius: 10px;
  background: white;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sarcelle);
  cursor: pointer;
}

.choix-type label svg {
  width: 16px;
  height: 16px;
}

.choix-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choix-type input:checked + label,
.choix-type label:has(input:checked) {
  background: var(--sarcelle);
  border-color: var(--sarcelle);
  color: white;
}

.choix-type input:focus-visible + label {
  outline: 2px solid var(--vert);
  outline-offset: 2px;
}

/* --- Onglets Écrire / Aperçu --- */
.onglets {
  display: flex;
  gap: 2px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--bord);
  background: #fafcfa;
  flex-wrap: wrap;
}

.onglet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 9px 16px;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #7a8a7a;
  cursor: pointer;
  margin-bottom: -1px;
}

.onglet:hover {
  color: var(--sarcelle);
  background: #eef6f6;
}

.onglet svg {
  width: 15px;
  height: 15px;
}

.onglet[aria-selected="true"] {
  background: white;
  border-color: var(--bord);
  color: var(--sarcelle);
  border-bottom: 1px solid white;
}

.onglet .doux {
  font-weight: 400;
  font-size: 11.5px;
  color: #9aa79a;
}

/* --- Statut d'envoi d'image, en ligne plutôt qu'en alert() --- */
.statut {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--bord);
}

.statut[hidden] {
  display: none;
}

.statut svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.statut--envoi {
  background: #eef6f6;
  color: #2d6f75;
}

.statut--envoi svg {
  animation: tourne 1.1s linear infinite;
}

@keyframes tourne {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .statut--envoi svg {
    animation: none;
  }
}

.statut--erreur {
  background: #fceaea;
  color: #741c1c;
}

/* --- Barre d'action collante --- */
.pied-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: white;
  border-top: 1px solid var(--bord);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
  padding: 12px 20px;
  margin-top: 16px;
  border-radius: 12px 12px 0 0;
}

.etat-modif {
  font-size: 12.5px;
  color: #b9820f;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.etat-modif[hidden] {
  display: none;
}

.etat-modif svg {
  width: 14px;
  height: 14px;
}

.brouillon {
  font-size: 11.5px;
  color: var(--attenue);
}

.pied-actions .droite {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vignette-reglage {
  width: 100%;
  height: 118px;
  border-radius: 8px;
  border: 1px solid var(--bord);
  background: #eef4ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b6c9b6;
  margin-bottom: 8px;
  overflow: hidden;
}

.vignette-reglage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vignette-reglage svg {
  width: 28px;
  height: 28px;
}

/* ===================== Éditeur Quill ===================== */

.quill-editor {
  background: white;
}

.quill-editor .ql-container {
  border: none;
  font-family: "Lato", "Helvetica Neue", sans-serif;
  font-size: 15px;
}

.quill-editor .ql-editor {
  min-height: 420px;
  line-height: 1.7;
  color: #2b3b3b;
  padding: 22px 26px;
}

.quill-editor .ql-editor img {
  max-width: 100%;
}

/* La barre d'outils de Quill, alignée sur le reste de l'admin. */
.quill-barre.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--bord);
  background: #fafcfa;
  padding: 8px 14px;
}

.ql-snow .ql-picker.ql-header {
  width: 140px;
}

.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
  content: "Texte normal";
}

.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  content: "Sous-titre";
}

.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  content: "Sous-sous-titre";
}

/* ===================== Aperçu public ===================== */

/* Règles reprises de style-pc.css (.article-detail) pour que l'aperçu montre
   exactement ce que le visiteur verra, et non le thème snow de Quill. */
.apercu-barre {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f0f6f6;
  border-bottom: 1px solid #e0ecec;
  font-size: 11.5px;
  color: #5d7a7d;
}

.apercu-barre svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.apercu {
  max-width: 800px;
  margin: 30px auto;
  padding: 0 20px;
  font-family: "Lato", sans-serif;
  color: #1b3b3f;
  line-height: 1.6;
  min-height: 380px;
}

.apercu > h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.apercu > img {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  margin: 20px auto;
}

.apercu .corps {
  margin-top: 20px;
}

.apercu .corps img {
  max-width: 100%;
  border-radius: 8px;
  margin: 15px 0;
}

.apercu .corps h2 {
  font-size: 1.3rem;
  color: #4cb8bf;
  margin-top: 25px;
}

.apercu .corps h3 {
  font-size: 1.1rem;
  color: var(--sarcelle);
  margin-top: 20px;
}

.apercu .corps ul,
.apercu .corps ol {
  margin: 10px 0;
  padding-left: 25px;
}

.apercu .corps li {
  margin-bottom: 5px;
}

.apercu .corps blockquote {
  margin: 15px 0;
  padding: 10px 20px;
  border-left: 4px solid #9dd5a2;
  color: #45636a;
  font-style: italic;
}

.apercu .corps a {
  color: #1b3b3f;
  text-decoration: underline;
}

.apercu .corps a:hover {
  color: #4cb8bf;
}

.apercu .vide-apercu {
  text-align: center;
  color: var(--attenue);
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  padding: 40px 0;
}

/* ===================== Mobile ===================== */

@media (max-width: 860px) {
  .colonnes {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiroir-grille {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .adm-header {
    padding: 8px 12px;
    flex-wrap: wrap;
  }

  .adm-header h1 {
    font-size: 1.05em;
    flex: 1;
    order: 2;
  }

  .adm-burger {
    display: inline-flex;
    order: 1;
  }

  /* Masquée par défaut sous 768px : piloter l'ouverture en CSS évite de
     voir le menu déplié une fraction de seconde avant que le JS s'exécute. */
  .adm-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px 0 2px;
  }

  .adm-nav.ouvert {
    display: flex;
  }

  .adm-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .adm-nav .sep {
    width: 100%;
    height: 1px;
    margin: 6px 0 2px;
  }

  .adm-wrap {
    margin: 12px auto;
    padding: 0 10px;
  }

  .bloc {
    padding: 14px;
    border-radius: 12px;
  }

  /* Les lignes s'empilent : le titre passe au-dessus des métadonnées. */
  .ligne {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }

  .ligne .titre {
    white-space: normal;
    overflow: visible;
    font-size: 13.5px;
    line-height: 1.35;
    flex-basis: 0;
  }

  .ligne .actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ligne .actions .btn {
    min-height: 40px;
  }

  .barre {
    gap: 8px;
  }

  .recherche {
    min-width: 100%;
    max-width: none;
  }

  .recherche input {
    min-height: 44px;
  }

  .pastille {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }

  .tri {
    margin-left: 0;
    width: 100%;
  }

  .tri select {
    flex: 1;
    min-height: 40px;
  }

  .onglet {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }

  .onglet .doux {
    display: none;
  }

  .quill-editor .ql-editor {
    min-height: 300px;
    padding: 16px 14px;
  }

  .apercu {
    margin: 18px auto;
    padding: 0 14px;
  }

  .pied-actions {
    padding: 10px 12px;
    gap: 8px;
  }

  .pied-actions .btn {
    min-height: 44px;
  }

  .brouillon {
    width: 100%;
    order: 3;
  }

  .entete-liste .btn {
    min-height: 44px;
  }
}

/* =========================================================================
   Composants des autres pages admin (cabinets, praticiens, interviews,
   livres, témoignages, pages, comptes, connexion).
   ========================================================================= */

/* ===================== Titres de section ===================== */

.bloc h2 {
  color: var(--vert);
  margin: 0 0 16px;
  font-size: 1.3em;
  border-bottom: 2px solid var(--vert-teinte);
  padding-bottom: 0.3em;
}

.bloc h2 + .sous-titre {
  margin: -8px 0 16px;
  font-size: 13px;
  color: var(--attenue);
  line-height: 1.5;
}

.bloc h3 {
  color: var(--sarcelle);
  font-size: 1.05em;
  margin: 24px 0 10px;
}

.section-sep {
  border: none;
  border-top: 1px solid var(--bord);
  margin: 26px 0;
}

.note {
  font-size: 11.5px;
  color: var(--attenue);
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.45;
}

/* ===================== Fieldset ===================== */

fieldset {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--fond-doux);
}

fieldset legend {
  font-weight: 600;
  font-size: 13px;
  color: var(--sarcelle);
  padding: 0 6px;
}

fieldset fieldset {
  background: white;
}

/* ===================== Lignes de liste : texte secondaire ===================== */

.item[hidden] {
  display: none;
}

.ligne .sous {
  font-size: 12px;
  color: var(--attenue);
  flex: none;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ligne .vignette--rond {
  border-radius: 50%;
  width: 44px;
  height: 44px;
}

/* ===================== Bloc « Ajouter … » ===================== */

.ajout {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--bord);
}

.form-ajout {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--vert);
  border-radius: 10px;
  background: var(--fond-doux);
}

.form-ajout[hidden] {
  display: none;
}

.form-ajout fieldset {
  border: none;
  background: none;
  padding: 0;
  margin: 0 0 14px;
}

/* ===================== Grille de champs ===================== */

.grille-champs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.grille-champs .pleine {
  grid-column: 1 / -1;
}

/* ===================== Lignes de champs répétables ===================== */

.list-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.list-row .saisie {
  flex: 1;
}

.faq-row {
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: white;
}

.faq-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.faq-row-header span {
  font-weight: 600;
  font-size: 12px;
  color: var(--attenue);
}

.adresse-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.adresse-item textarea.saisie {
  flex: 2;
  min-height: 62px;
}

.adresse-item input.saisie {
  flex: 3;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sarcelle);
  color: white;
  border: none;
  padding: 0.4em 1em;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-add:hover {
  background: var(--sarcelle-fonce);
}

.btn-add svg {
  width: 13px;
  height: 13px;
}

.btn-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: white;
  color: var(--danger);
  border: 1px solid #f0cfce;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}

.btn-del:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-del svg {
  width: 14px;
  height: 14px;
}

/* ===================== Onglets pleine largeur (page Pages) ===================== */

.onglets--haut {
  background: none;
  border-bottom: none;
  padding: 0;
  margin-bottom: 16px;
  gap: 6px;
}

.onglets--haut .onglet {
  background: white;
  border: 1px solid var(--bord);
  border-radius: 10px;
  margin-bottom: 0;
  padding: 10px 18px;
}

.onglets--haut .onglet[aria-selected="true"] {
  background: var(--sarcelle);
  border-color: var(--sarcelle);
  color: white;
}

/* ===================== Tableau (comptes) ===================== */

.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tableau th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--attenue);
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--bord);
}

.tableau td {
  padding: 12px;
  border-bottom: 1px solid var(--bord);
  vertical-align: middle;
}

.tableau tr:last-child td {
  border-bottom: none;
}

.tableau .moi {
  font-size: 11.5px;
  color: var(--attenue);
  font-style: italic;
}

.tableau .principal {
  font-weight: 600;
}

/* ===================== Page de connexion ===================== */

body.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(145deg, #e8f5f4, #f9fcf9);
}

.login-box {
  background: white;
  border-radius: 14px;
  box-shadow: var(--ombre-bloc);
  border-top: 4px solid var(--vert);
  padding: 32px 28px 24px;
  width: 100%;
  max-width: 380px;
}

.login-box h1 {
  color: var(--sarcelle);
  font-size: 1.25em;
  margin: 0 0 20px;
  text-align: center;
}

.login-box .btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  min-height: 44px;
}

.login-box footer {
  text-align: center;
  color: var(--attenue);
  font-size: 11.5px;
  margin-top: 22px;
}

/* ===================== Mobile (suite) ===================== */

@media (max-width: 768px) {
  .grille-champs {
    grid-template-columns: minmax(0, 1fr);
  }

  .adresse-item {
    flex-wrap: wrap;
  }

  .adresse-item textarea.saisie,
  .adresse-item input.saisie {
    flex: 1 1 100%;
  }

  .onglets--haut {
    flex-direction: column;
  }

  .onglets--haut .onglet {
    width: 100%;
  }

  .ligne .sous {
    max-width: 100%;
    flex-basis: 100%;
    white-space: normal;
  }

  .btn-add,
  .btn-del {
    min-height: 40px;
  }

  /* Le tableau des comptes passe en fiches empilées. */
  .tableau,
  .tableau tbody,
  .tableau tr,
  .tableau td {
    display: block;
    width: 100%;
  }

  .tableau thead {
    display: none;
  }

  .tableau tr {
    border: 1px solid var(--bord);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  .tableau td {
    border: none;
    padding: 4px 0;
  }

  .tableau td::before {
    content: attr(data-libelle) " ";
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--attenue);
  }
}
