/* ============================================================
   ESPACE ADMIN — Lions Club de Neuilly-sur-Seine
   ============================================================ */
:root {
  --bleu-fanion: #14506B;
  --bleu-nuit:   #0C3247;
  --or:          #F2B705;
  --or-fonce:    #D9A404;
  --brume:       #F4F8FA;
  --encre:       #24333D;
  --gris-doux:   #5E6E78;
  --rouge:       #C0392B;
  --vert:        #1E7B4F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Karla', Helvetica, Arial, sans-serif;
  background: var(--brume);
  color: var(--encre);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2 { font-family: 'Marcellus', serif; font-weight: 400; color: var(--bleu-nuit); }

a { color: var(--bleu-fanion); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Boutons --- */
.btn-principal, .btn-secondaire, .btn-danger {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .1s;
  text-align: center;
}
.btn-principal { background: var(--or); color: var(--bleu-nuit); }
.btn-secondaire { background: var(--bleu-fanion); color: #fff; }
.btn-danger { background: #fff; color: var(--rouge); border: 1.5px solid var(--rouge); padding: 9px 18px; }
.btn-principal:hover, .btn-secondaire:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-danger:hover { background: var(--rouge); color: #fff; }
.btn-secondaire:hover { text-decoration: none; }

/* --- Messages flash --- */
.message { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-weight: 700; }
.message.succes { background: #E4F5EC; color: var(--vert); border: 1px solid #BCE4CE; }
.message.erreur { background: #FBE9E7; color: var(--rouge); border: 1px solid #F2C4BE; }
.message.info   { background: #EAF4FB; color: var(--bleu-fanion); border: 1px solid #C5E0F0; }

/* ============================================================
   PAGE DE CONNEXION
   ============================================================ */
.page-connexion {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(160deg, var(--bleu-nuit) 0%, var(--bleu-fanion) 100%);
}

.carte-connexion {
  background: #fff;
  border-radius: 12px;
  border-top: 5px solid var(--or);
  padding: 40px 34px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.carte-connexion h1 { font-size: 28px; text-align: center; }
.sous-titre { text-align: center; color: var(--gris-doux); margin: 4px 0 24px; }

.carte-connexion label { display: block; font-weight: 700; margin: 14px 0 5px; color: var(--bleu-nuit); }

.carte-connexion input {
  width: 100%;
  padding: 12px;
  border: 1px solid #D6E2E9;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
}
.carte-connexion input:focus { outline: none; border-color: var(--bleu-fanion); box-shadow: 0 0 0 3px rgba(20,80,107,.12); }

.carte-connexion .btn-principal { width: 100%; margin-top: 22px; }

.retour-site { text-align: center; margin-top: 18px; font-size: 14px; }

/* ============================================================
   TABLEAU DE BORD
   ============================================================ */
.admin-header {
  background: var(--bleu-nuit);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}
.admin-header h1 { color: #fff; font-size: 24px; }
.admin-header nav { display: flex; gap: 20px; }
.admin-header a { color: #BFDCEC; font-weight: 700; }
.admin-header a:hover { color: var(--or); text-decoration: none; }
.lien-deconnexion { color: var(--or) !important; }

.admin-main { max-width: 860px; margin: 0 auto; padding: 30px 20px 60px; }

.bloc {
  background: #fff;
  border-radius: 12px;
  border-top: 4px solid var(--or);
  box-shadow: 0 6px 22px rgba(12,50,71,.07);
  padding: 30px 28px;
  margin-bottom: 30px;
}

.bloc h2 { font-size: 24px; margin-bottom: 18px; }

.bloc label { display: block; font-weight: 700; margin: 16px 0 6px; color: var(--bleu-nuit); }

.bloc input[type="text"],
.bloc textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #D6E2E9;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
}
.bloc textarea { resize: vertical; min-height: 160px; }
.bloc input:focus, .bloc textarea:focus { outline: none; border-color: var(--bleu-fanion); box-shadow: 0 0 0 3px rgba(20,80,107,.12); }

.bloc input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 2px dashed #C4D6E0;
  border-radius: 6px;
  background: var(--brume);
}

.bloc .btn-principal { margin-top: 22px; }

/* --- Liste des articles --- */
.liste-articles { list-style: none; }

.ligne-article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #E9F0F4;
  flex-wrap: wrap;
}
.ligne-article:last-child { border-bottom: none; }

.apercu img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.sans-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  background: var(--brume);
  color: var(--gris-doux);
  font-size: 11px;
  text-align: center;
}

.infos { flex: 1; min-width: 200px; }
.infos strong { display: block; line-height: 1.35; }
.infos small { color: var(--gris-doux); }

.boutons { display: flex; gap: 10px; align-items: center; }

/* --- Grille de photos (page modifier) --- */
.grille-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.vignette {
  border: 1px solid #E3EBF0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--brume);
  cursor: pointer;
  font-weight: 400 !important;
  margin: 0 !important;
}
.vignette img { width: 100%; height: 100px; object-fit: cover; display: block; }
.vignette span { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 14px; }
.vignette:has(input:checked) { outline: 3px solid var(--rouge); }
.vignette:has(input:checked) span { color: var(--rouge); font-weight: 700; }

@media (max-width: 560px) {
  .ligne-article { align-items: flex-start; }
  .boutons { width: 100%; justify-content: flex-end; }
}
