/* =====================================================================
   SOCLE COMMUN - Bibliotheque numerique du CEFOREP
   Design system partage entre l'OPAC public et l'espace de gestion
   (back-office), afin que les deux interfaces restent visuellement
   coherentes : memes couleurs, memes composants de base (boutons,
   formulaires, alertes, badges, cartes, tableaux de fiche).

   Charge AVANT style_opac.css / style_admin.css : les regles ci-dessous
   definissent le socle commun ; les feuilles specifiques ne gardent que
   ce qui est propre a chaque espace (en-tete/nav/hero/pied de page cote
   OPAC, barre laterale/tableau de bord cote gestion).
   ===================================================================== */

:root {
    /* Palette fidele a la charte graphique du CEFOREP (couleurs extraites
       du logo officiel : vert-teal de la carte d'Afrique + or de la
       couronne de laurier). Un seul jeu de couleurs pour l'OPAC et
       l'espace de gestion, afin que les deux interfaces soient
       visuellement identiques. */
    --primary: #0f7a6a;
    --primary-dark: #0a5d51;
    --primary-light: #e8f3f0;
    --secondary: #d4a017;        /* or du logo : accents, textes, decorations */
    --secondary-dark: #93690c;   /* or fonce : fonds de bouton (texte blanc lisible) */
    --secondary-darker: #6f4f09; /* or tres fonce : etat hover des boutons or */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background: #f4f6f7;
    --white: #ffffff;
    --danger: #c0392b;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.12);
    --transition: all 0.25s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background);
}

a { color: inherit; }

/* ===== CARTES ===== */
.card { background: var(--white); border-radius: 10px; padding: 22px; box-shadow: var(--shadow); }
.card h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.15rem; border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; }

/* ===== PANNEAUX (back-office, mais reutilisable partout) ===== */
.panel { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 25px; }
.panel-header { padding: 18px 25px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.panel-header h2 { font-size: 1.15rem; color: var(--text-dark); }
.panel-body { padding: 25px; }

/* ===== TABLEAU DE FICHE (paires cle / valeur) ===== */
.fiche-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.fiche-table tr { border-bottom: 1px solid #eee; }
.fiche-table td { padding: 10px 5px; vertical-align: top; }
.fiche-table td:first-child { font-weight: 600; color: var(--text-light); width: 180px; }

/* ===== BOUTONS ===== */
.btn { padding: 10px 22px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.92rem; border: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #eee; color: var(--text-dark); }
.btn-secondary:hover { background: #ddd; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #a5281d; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ===== FORMULAIRES ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 0.95rem; color: var(--text-dark); }
.form-group .hint { display: block; font-weight: 400; color: var(--text-light); font-size: 0.8rem; margin-top: 3px; }
.form-group input:not([type="checkbox"]):not([type="radio"]), .form-group select, .form-group textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; font-family: inherit; transition: var(--transition); background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 800px) { .form-row, .form-row.cols-3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 25px; padding-top: 20px; border-top: 1px solid #eee; }

/* ===== ALERTES ===== */
.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: #e6f7ee; color: #1b7a43; border-left: 4px solid #1b7a43; }
.alert-error { background: #fdecea; color: #b02a1e; border-left: 4px solid #b02a1e; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }

/* ===== BADGES DE STATUT ===== */
.badge-statut { padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; display: inline-block; }
.badge-statut.publie { background: #e6f7ee; color: #1b7a43; }
.badge-statut.brouillon { background: #fdf3e3; color: #b8790a; }

/* ===== ETAT VIDE ===== */
.etat-vide { text-align: center; padding: 50px 20px; color: var(--text-light); }
.etat-vide i { font-size: 3rem; margin-bottom: 15px; color: var(--primary-light); display: block; }
