/* ============================================
   Amis, Bladas et Dalon — Style partagé
   Tous les onglets statiques utilisent ce CSS
   ============================================ */

/* --- Fond de page — image à 100% d'opacité --- */
html {
    background-image: url('/img/fond-reunion-guyane.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    color: #3d3226;
    background: transparent;
    padding-top: 60px;
}

/* --- Barre de navigation harmonisée --- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(26, 92, 42, 0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    height: 56px; display: flex; align-items: center;
}
.site-nav-inner {
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 0 20px; display: flex; justify-content: space-between; align-items: center;
}
.site-nav .logo {
    font-weight: 700; font-size: 1.1rem; color: #1a5c2a;
    text-decoration: none; letter-spacing: -0.01em;
}
.site-nav .logo:hover { color: #2a7c3a; }
.site-nav .nav-links {
    display: flex; gap: 2px; list-style: none;
    overflow-x: auto; white-space: nowrap;
}
.site-nav .nav-links a {
    font-weight: 500; font-size: 0.88rem; color: #5a4e3e;
    padding: 6px 14px; border-radius: 8px; text-decoration: none;
    transition: all 0.2s; display: block;
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    background: rgba(26,92,42,0.08); color: #1a5c2a;
}

@media (prefers-color-scheme: dark) {
    .site-nav { background: rgba(26,26,46,0.85); border-bottom-color: rgba(58,143,74,0.10); }
    .site-nav .nav-links a { color: #b0a896; }
    .site-nav .nav-links a:hover,
    .site-nav .nav-links a.active { background: rgba(58,143,74,0.12); color: #6fcf6f; }
    .site-nav .logo { color: #6fcf6f; }
}

@media (max-width: 600px) {
    .site-nav .logo { font-size: 0.95rem; }
    .site-nav .nav-links a { font-size: 0.8rem; padding: 5px 10px; }
    body { padding-top: 52px; }
    .site-nav { height: 48px; }
}

.main-container {
    position: relative; z-index: 1;
    max-width: 1200px; margin: 0 auto; padding: 24px 20px;
}

/* --- Cartes — opaques pour lisibilité --- */
.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(26, 92, 42, 0.10);
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(26,92,42,0.06);
    margin-bottom: 20px;
}

/* --- Navigation --- */
.back-link {
    display: inline-block; color: #5a4e3e; font-size: 0.85em;
    margin-bottom: 16px; text-decoration: none; font-weight: 500;
}
.back-link:hover { color: #1a5c2a; }

/* --- Titres --- */
h1, h2, h3 { color: #1a5c2a; }
h1 { font-size: 1.5em; margin-bottom: 16px; }
h2 { font-size: 1.2em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(26,92,42,0.08); }

/* --- Formulaires --- */
label {
    display: block; color: #5a4e3e; font-size: 0.85em;
    margin-bottom: 4px; margin-top: 12px;
}
label .required { color: #c0392b; }
input, textarea, select {
    width: 100%; padding: 10px 12px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(26,92,42,0.15);
    border-radius: 8px; color: #3d3226; font-size: 0.95em; outline: none;
}
input:focus, textarea:focus { border-color: #1a5c2a; box-shadow: 0 0 0 3px rgba(26,92,42,0.06); }
input:disabled { background: #f0ede5; color: #8b7355; }

/* --- Boutons --- */
.btn {
    display: inline-block; padding: 10px 24px; font-size: 14px;
    background: #1a5c2a; color: white; border: none; border-radius: 8px;
    cursor: pointer; font-weight: 500; transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: #2a7c3a; }
.btn:active { transform: scale(0.97); }
.btn-cancel { background: #e0d5c5; color: #5a4e3e; }
.btn-cancel:hover { background: #d0c5b5; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #e74c3c; }
.btn-sm { padding: 5px 10px; font-size: 0.8em; }

/* --- Messages --- */
.msg { margin: 10px 0; font-size: 0.9em; padding: 8px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg-success { background: rgba(26,92,42,0.08); color: #1a5c2a; }
.msg-error { background: rgba(192,57,43,0.08); color: #c0392b; }

/* --- Tableaux --- */
.table-wrapper { overflow-x: auto; border-radius: 10px; border: 1px solid rgba(26,92,42,0.10); }
table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
th {
    background: rgba(26,92,42,0.06); color: #5a4e3e; font-weight: 600;
    text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(26,92,42,0.10); white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid rgba(26,92,42,0.05); vertical-align: middle; }
tr:hover td { background: rgba(26,92,42,0.03); }
tr:last-child td { border-bottom: none; }
td.empty { color: #b0a090; font-style: italic; }
td a { color: #1a5c2a; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* --- Badges --- */
.badge {
    display: inline-block; font-size: 0.7em; padding: 2px 6px; border-radius: 4px;
    margin-left: 6px; font-weight: 500;
}
.badge-profil { background: rgba(26,92,42,0.10); color: #1a5c2a; }
.badge-extra { background: rgba(193,122,78,0.10); color: #8b5a3a; }

/* --- Modales --- */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 100; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: rgba(255,255,255,0.97); backdrop-filter: blur(20px);
    border: 1px solid rgba(26,92,42,0.12); border-radius: 16px;
    padding: 30px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.modal h2 { color: #1a5c2a; margin-bottom: 20px; font-size: 1.3em; border: none; padding: 0; }
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* --- Galerie --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-item {
    position: relative; border-radius: 12px; overflow: hidden;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(26,92,42,0.08);
    transition: transform 0.2s; aspect-ratio: 1;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white; padding: 12px 10px 8px; font-size: 0.82em;
    opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .info { opacity: 1; }
.gallery-item .delete-btn {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.5); color: white; border: none;
    border-radius: 50%; width: 28px; height: 28px; cursor: pointer;
    font-size: 16px; opacity: 0; transition: opacity 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .delete-btn { opacity: 1; }
.gallery-item .delete-btn:hover { background: #c0392b; }
.upload-area {
    border: 2px dashed rgba(26,92,42,0.20); border-radius: 12px;
    padding: 30px; text-align: center; margin-bottom: 24px;
    transition: border-color 0.2s; cursor: pointer;
}
.upload-area:hover { border-color: #1a5c2a; background: rgba(26,92,42,0.03); }
.upload-area.dragover { border-color: #1a5c2a; background: rgba(26,92,42,0.08); border-style: solid; }
.upload-area p { color: #8b7355; margin-top: 8px; font-size: 0.9em; }
.upload-area input { display: none; }

/* --- Lightbox --- */
.lightbox {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    z-index: 200; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 95%; max-height: 90vh; border-radius: 8px; }

/* --- Actions inline --- */
.actions { white-space: nowrap; }
.edit-btn, .delete-btn {
    background: none; border: 1px solid rgba(26,92,42,0.12); cursor: pointer;
    padding: 6px 12px; border-radius: 6px; font-size: 0.9em; transition: all 0.2s;
    color: #8b7355;
}
.edit-btn:hover { border-color: #1a5c2a; color: #1a5c2a; background: rgba(26,92,42,0.06); }
.delete-btn { margin-left: 4px; }
.delete-btn:hover { border-color: #c0392b; color: #c0392b; background: rgba(192,57,43,0.06); }

/* --- Pied de page --- */
footer {
    text-align: center; margin-top: 40px; color: #8b7355; font-size: 0.85em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-container { padding: 12px 10px; }
    .card { padding: 20px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
