/* Admin Loutopia : couleurs du site, lisible sur téléphone. */
:root { --bordeaux: #683027; --nuit: #2a110d; --creme: #f8e5d6; --papier: #fffaf5; --orange: #ec812e; --foret: #3d4a32; --encre: #2e1c17; --douce: #6b5149; --trait: #ecd7c6; --rouge: #a3261b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--bordeaux); }
h1, h2, h3 { color: var(--bordeaux); line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.cadre { width: min(1100px, 100% - 32px); margin: 1.5rem auto 4rem; }
.barre { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .75rem 16px; background: var(--bordeaux); color: var(--creme); }
.barre a { color: var(--creme); text-decoration: none; }
.barre nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; flex: 1; }
.barre nav a { padding: .3rem 0; border-bottom: 2px solid transparent; }
.barre nav a[aria-current], .barre nav a:hover { border-color: var(--orange); }
.marque { font-weight: 800; font-size: 1.15rem; }
.marque span, .connexion h1 span { font-weight: 400; opacity: .7; }
.lien { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.3em; border: 2px solid var(--orange); border-radius: 999px; background: var(--orange); color: var(--nuit); font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.btn-ligne { background: transparent; border-color: var(--bordeaux); color: var(--bordeaux); }
.btn-danger { background: transparent; border-color: var(--rouge); color: var(--rouge); }
.btn-danger:hover { background: var(--rouge); border-color: var(--rouge); }
.btn-petit { padding: .45em .9em; font-size: .9rem; }
.connexion { max-width: 360px; margin: 12vh auto 0; display: grid; gap: .6rem; }
input, textarea, select { width: 100%; padding: .65em .8em; border: 1px solid #cfb8a6; border-radius: 10px; font: inherit; background: #fff; color: var(--encre); }
label { font-weight: 700; }
.alerte { background: #fde8e4; color: var(--rouge); border-radius: 10px; padding: .6em .9em; margin: 0; }
.tuiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.5rem 0; }
.tuile { display: grid; gap: .4rem; padding: 1.5rem; border-radius: 18px; background: var(--bordeaux); color: var(--creme); text-decoration: none; min-height: 140px; align-content: end; transition: transform .15s; }
.tuile:nth-child(2) { background: var(--foret); }
.tuile:nth-child(3) { background: var(--nuit); }
.tuile strong { font-size: 1.3rem; color: #fff; }
.tuile:hover { transform: translateY(-3px); }
.statut { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 16px; }
.statut p { margin: 0; flex: 1; font-weight: 700; }
.statut.ok { background: #e3eedc; color: #2d4a1e; }
.statut.erreur { background: #fde8e4; color: var(--rouge); }
.statut pre { white-space: pre-wrap; font-size: .8rem; max-height: 240px; overflow: auto; }
.voir { margin-top: 2rem; }
.aide { color: var(--douce); max-width: 70ch; }
.ajout { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; padding: 1rem; margin: 1rem 0 1.5rem; border: 2px dashed var(--trait); border-radius: 14px; }
.ajout label { width: 100%; }
.ajout input { flex: 1; min-width: 200px; }
.grille-photos { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grille-photos li { background: #fff; border-radius: 14px; box-shadow: 0 4px 14px rgb(74 31 25 / .08); padding: .6rem; display: grid; gap: .4rem; align-content: start; }
.grille-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f3ebe3; border-radius: 10px; }
.grille-photos p { margin: 0; }
.grille-photos .nom { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.grille-photos .usage { font-size: .85rem; color: var(--douce); }
.grille-photos form { display: inline; }
.fil { font-size: .9rem; color: var(--douce); margin: 0 0 .5rem; }
.bloc { background: #fff; border-radius: 16px; padding: 1rem 1.25rem; margin-bottom: 1rem; box-shadow: 0 4px 14px rgb(74 31 25 / .06); }
.bloc h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.liste { list-style: none; padding: 0; margin: 0 0 .75rem; }
.liste li { padding: .55rem 0; border-bottom: 1px solid var(--trait); }
.liste li:last-child { border-bottom: 0; }
.liste a { font-weight: 700; }
.meta, .opt { color: var(--douce); font-size: .88rem; font-weight: 400; }
.formulaire { display: grid; gap: .5rem; }
.formulaire textarea { min-height: 8rem; }
.champs { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.champs p { margin: 0 0 .6rem; display: grid; gap: .25rem; }
.actions { position: sticky; bottom: 0; padding: .75rem 0; background: linear-gradient(transparent, var(--papier) 30%); }
.danger { margin-top: 2rem; }
fieldset.fiche { border: 0; background: #fff; border-radius: 16px; padding: 1rem 1.25rem; margin: 0 0 1rem; box-shadow: 0 4px 14px rgb(74 31 25 / .06); display: grid; gap: .5rem; }
fieldset.fiche legend { font-weight: 800; color: var(--bordeaux); padding: 0; float: left; width: 100%; margin-bottom: .25rem; font-size: 1.1rem; }
fieldset.nouveau { border: 2px dashed var(--trait); background: transparent; box-shadow: none; }
.fiche label { display: grid; gap: .25rem; }
.fiche label.case { display: flex; gap: .5rem; align-items: center; font-weight: 400; color: var(--rouge); }
.fiche label.case input { width: auto; }
.fiche details summary { cursor: pointer; font-weight: 700; margin: .25rem 0; }
.articles { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.articles a { display: grid; gap: .3rem; background: #fff; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--encre); box-shadow: 0 4px 14px rgb(74 31 25 / .08); padding-bottom: .75rem; }
.articles img, .articles .sans-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f3ebe3; display: block; }
.articles strong, .articles .meta { padding: 0 .8rem; }
.articles strong { color: var(--bordeaux); }
/* Éditeur : boutons avec des mots plutôt que des icônes (pas de police d'icônes externe). */
.EasyMDEContainer .editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; border-color: #cfb8a6; border-radius: 10px 10px 0 0; background: #fff; }
.EasyMDEContainer .editor-toolbar button.bt { width: auto; min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; font: 700 .9rem/1 system-ui, sans-serif; color: var(--bordeaux); }
.EasyMDEContainer .editor-toolbar button.bt-titre::before { content: "Intertitre"; }
.EasyMDEContainer .editor-toolbar button.bt-citation::before { content: "Citation"; }
.EasyMDEContainer .editor-toolbar button.bt-lien::before { content: "Lien"; }
.EasyMDEContainer .editor-toolbar button.bt-photo::before { content: "Photo"; }
.EasyMDEContainer .editor-toolbar button.bt-apercu::before { content: "Aperçu"; }
.EasyMDEContainer .editor-toolbar button.bt-cote::before { content: "Côte à côte"; }
.EasyMDEContainer .editor-toolbar button.bt-gras::before { content: "G"; font-weight: 900; }
.EasyMDEContainer .editor-toolbar button.bt-italique::before { content: "I"; font-style: italic; font-family: Georgia, serif; }
.EasyMDEContainer .editor-toolbar button.bt-liste::before { content: "• Liste"; }
.EasyMDEContainer .editor-toolbar button.bt-photo { background: var(--orange); color: var(--nuit); }
.EasyMDEContainer .editor-toolbar button.active, .EasyMDEContainer .editor-toolbar button:hover { background: var(--creme); border-color: transparent; }
.EasyMDEContainer .CodeMirror { border-color: #cfb8a6; border-radius: 0 0 10px 10px; font: 1rem/1.6 system-ui, sans-serif; }
.EasyMDEContainer .editor-preview { background: var(--papier); font: 1rem/1.6 system-ui, sans-serif; }
.EasyMDEContainer .editor-preview img { max-width: 100%; border-radius: 8px; }
@media (max-width: 640px) {
  .barre nav { order: 3; flex-basis: 100%; }
  .barre form { margin-left: auto; }
  .statut { flex-direction: column; align-items: stretch; }
  .statut .btn { width: 100%; justify-content: center; }
}
