/* ======================================================================
   FONTS CORPORATE COMPASSION (NEIGHBOUR SANS)
   ====================================================================== */

/* Texte normal (Général, descriptions, traductions) */
@font-face {
    font-family: 'Neighbour Sans';
    src: url('fonts/NeighbourSans-Normal.woff2') format('woff2'),
    url('fonts/NeighbourSans-Normal.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Titres, sous-titres et éléments mis en valeur */
@font-face {
    font-family: 'Neighbour Sans';
    src: url('fonts/NeighbourSans-Bold.woff2') format('woff2'),
    url('fonts/NeighbourSans-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- VARIABLES DE COULEURS OFFICIELLES COMPASSION --- */
:root {
    --primary-blue: #2a5eec;     /* Bleu Compassion Corporate */
    --light-blue: #f0f4ff;       /* Fond bleu très léger pour les tags */
    --success-green: #499e57;    /* Vert boutons */
    --success-hover: #3d8649;
    --danger-red: #da291c;       /* Rouge boutons */
    --danger-hover: #be2015;
    --warning-yellow: #ffd257;   /* Jaune boutons */
    --warning-hover: #e6bd47;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-main: #f4f7f6;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

/* --- BASE (Modifiée pour le Full Width) --- */
body {
    font-family: 'Neighbour Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0; /* Mis à 0 pour coller le header aux bords */
    background-color: var(--bg-main);
    color: var(--text-dark);
    max-width: 100%;
    font-weight: 400;
    display: flex;
    flex-direction: column;
}

/* --- BANDEAU HEADER STYLE COMPASSION.CH --- */
.app-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(42, 94, 236, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.app-header h1 {
    color: var(--white); /* Forcé en blanc sur le bandeau bleu */
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

/* --- CONTENEUR DU CONTENU (Prend le relais pour les marges) --- */
.main-content {
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

h2 {
    color: var(--text-dark);
    margin-top: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-weight: 700;
}

/* --- BOÎTES (Recherche & Ajout) --- */
.box {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* --- FORMULAIRES --- */
.form-group {
    margin-top: 15px;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 94, 236, 0.1);
    outline: none;
}

textarea {
    height: 120px;
    resize: vertical;
}

/* --- MENU DÉROULANT (Ajouter) --- */
details {
    cursor: pointer;
}

summary {
    font-weight: 700;
    color: var(--success-green);
    font-size: 1.1em;
    outline: none;
    margin-bottom: 10px;
    list-style: none;
    display: flex;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

/* --- BOUTONS --- */
button {
    padding: 10px 18px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background: #1b49c4;
}

button:active {
    transform: scale(0.98);
}

.btn-add {
    background: var(--success-green);
    margin-top: 15px;
    font-size: 1em;
}

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

/* --- BARRE DE FILTRES --- */
.filtres-bar {
    margin: 30px 0;
    padding: 15px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filtres-title {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 0.95em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-filter {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    background: var(--bg-main);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85em;
    font-weight: 700;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.badge-filter:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.badge-filter.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(42, 94, 236, 0.3);
}

/* --- LA GRILLE DE CARTES --- */
.grille-termes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 25px;
    align-items: stretch;
    width: 100%;
}

/* --- CARTES DES TERMES --- */
.terme {
    margin-bottom: 0;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.terme:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.terme h3 {
    margin: 5px 0 15px 0;
    color: var(--primary-blue);
    font-size: 1.35em;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding-right: 85px;
}

.categorie-tag {
    font-size: 0.75em;
    color: var(--primary-blue);
    background: var(--light-blue);
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.traductions {
    font-size: 0.95em;
    color: var(--text-dark);
    margin-bottom: 15px;
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

.traductions strong {
    font-weight: 700;
}

.info {
    margin-top: auto;
    line-height: 1.5;
    color: #4a5568;
    font-size: 0.95em;
    padding-top: 10px;
}

/* --- BOUTONS ADMIN --- */
.actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
}

.btn-action {
    font-size: 0.75em;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.btn-edit {
    background: var(--warning-yellow);
    color: #000;
}

.btn-edit:hover {
    background: var(--warning-hover);
}

.btn-delete {
    background: var(--danger-red);
    color: var(--white);
}

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

/* --- BOUTON COPIER --- */
.btn-copy {
    background: var(--success-green);
    color: var(--white);
    border: none;
    font-size: 0.75em;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 5px;
    margin-left: 10px;
    display: inline-block;
    font-weight: 700;
    font-family: inherit;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-copy:hover {
    background: var(--success-hover);
}

/* --- MESSAGES --- */
.message {
    padding: 15px;
    margin-bottom: 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-weight: 700;
    border-left: 5px solid var(--success-green);
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid var(--danger-red);
}

.btn-cancel {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    text-decoration: none;
    font-weight: 700;
}