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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #2c3e50;
}

/* ── HERO ── */
.hero {
    position: relative;
    min-height: 420px;
    background: linear-gradient(135deg, #0a2342 0%, #1a4a7a 60%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('assets/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.18;
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
}
.logo {
    max-height: 120px;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.hero-content h1 {
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    max-width: 700px;
    margin: 0 auto 0.6rem;
}
.hero-sub {
    color: #aed6f1;
    font-size: 1.1rem;
    margin-bottom: 1.6rem;
    font-style: italic;
}

/* ── PAGE HEADER (pages internes) ── */
.page-header {
    background: linear-gradient(135deg, #0a2342, #1a4a7a);
    padding: 1.5rem 2rem;
}
.page-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}
.logo-small {
    max-height: 60px;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}
.page-header h1 {
    color: #fff;
    font-size: 1.6rem;
}

/* ── NAV ── */
.main-nav {
    background: #0a2342;
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.main-nav a {
    color: #aed6f1;
    text-decoration: none;
    padding: 0.85rem 1.4rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a.active {
    background: #1a4a7a;
    color: #fff;
}

/* ── BOUTONS ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e67e22;
    color: #fff;
    padding: 0.75rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: #d35400; transform: translateY(-1px); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.75rem 1.4rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.btn-secondary:hover { background: #dde1e3; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #eaf2fb;
    color: #1a4a7a;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.btn-icon:hover { background: #d6eaf8; }
.btn-icon.danger { background: #fdecea; color: #c0392b; }
.btn-icon.danger:hover { background: #fadbd8; }

/* ── OBJECTIFS ── */
.objectifs {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}
.objectifs h2, .galerie h2, .timeline-section h2 {
    font-size: 1.5rem;
    color: #0a2342;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.objectifs-intro {
    background: #fff;
    border-left: 4px solid #e67e22;
    border-radius: 8px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    line-height: 1.7;
    color: #2c3e50;
}
.objectifs-intro strong { color: #0a2342; }

.objectifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}
.objectif-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.8rem 1.4rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-top: 4px solid #1a4a7a;
    transition: transform 0.2s, box-shadow 0.2s;
}
.objectif-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.objectif-card i { font-size: 2rem; color: #e67e22; margin-bottom: 0.8rem; }
.objectif-card h3 { color: #0a2342; margin-bottom: 0.5rem; }
.objectif-card p { font-size: 0.9rem; color: #555; line-height: 1.5; }

/* ── GALERIE PÊLE-MÊLE ── */
.galerie {
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}
.pele-mele {
    columns: 3;
    column-gap: 1rem;
}
@media (max-width: 768px) { .pele-mele { columns: 2; } }
@media (max-width: 480px) { .pele-mele { columns: 1; } }
.photo-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.photo-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s;
}
.photo-item:hover img { transform: scale(1.03); }
.photo-item .legende {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(10,35,66,0.75);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}
.galerie-vide {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 12px;
    color: #888;
}
.galerie-vide i { font-size: 3rem; margin-bottom: 1rem; color: #bdc3c7; }

/* ── TIMELINE ── */
.timeline-section {
    max-width: 1000px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}
.filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.filtre-btn {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.filtre-btn:hover, .filtre-btn.active {
    background: #1a4a7a;
    color: #fff;
}
.timeline {
    position: relative;
    padding: 1rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #1a4a7a, #2980b9);
    transform: translateX(-50%);
}
@media (max-width: 650px) {
    .timeline::before { left: 18px; }
    .timeline-item.left, .timeline-item.right { padding-left: 50px; padding-right: 0; }
    .timeline-item .timeline-dot { left: 10px !important; right: auto !important; }
}
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 2.5rem 2rem 0;
}
.timeline-item.right {
    left: 50%;
    padding: 0 0 2rem 2.5rem;
}
.timeline-dot {
    position: absolute;
    right: -8px;
    top: 12px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #e67e22;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e67e22;
    z-index: 1;
}
.timeline-item.right .timeline-dot { left: -8px; right: auto; }
.timeline-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-left: 4px solid #1a4a7a;
}
.timeline-item.right .timeline-card { border-left: none; border-right: 4px solid #1a4a7a; }
.timeline-date {
    font-size: 0.82rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}
.timeline-cat {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    background: #eaf2fb;
    color: #1a4a7a;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}
.timeline-card h3 { color: #0a2342; margin-bottom: 0.5rem; font-size: 1rem; }
.timeline-card p { font-size: 0.9rem; color: #555; line-height: 1.5; }
.timeline-photo {
    width: 100%;
    border-radius: 6px;
    margin-top: 0.8rem;
    max-height: 200px;
    object-fit: cover;
}
.timeline-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.8rem;
    justify-content: flex-end;
}
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    color: #888;
}
.empty-state i { font-size: 3rem; color: #bdc3c7; margin-bottom: 1rem; display: block; }

/* ── ADMIN ── */
.admin-section {
    max-width: 900px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.tab-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 8px 8px 0 0;
    background: #dde4ec;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
}
.tab-btn.active, .tab-btn:hover { background: #1a4a7a; color: #fff; }
.admin-form-container {
    background: #fff;
    border-radius: 0 12px 12px 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.admin-form-container h2 {
    color: #0a2342;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}
.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 600px) { .admin-form .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { margin-bottom: 1rem; }
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.form-group input, .form-group select, .form-group textarea {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #dde4ec;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #f9fafc;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #1a4a7a;
    background: #fff;
}
.form-group small { color: #888; font-size: 0.8rem; }
.form-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}
.msg {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}
.msg.success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.msg.error   { background: #fdecea; color: #c0392b; border: 1px solid #f5b7b1; }

/* ── PHOTOS ADMIN ── */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.photo-admin-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f4f6f9;
}
.photo-admin-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.photo-admin-item span {
    display: block;
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    color: #555;
}
.photo-admin-item .btn-icon {
    position: absolute;
    top: 6px; right: 6px;
}

/* ── FOOTER ── */
footer {
    background: #0a2342;
    color: #aed6f1;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    margin-top: 2rem;
}
footer a { color: #e67e22; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── CATÉGORIES COULEURS ── */
.cat-creation    { background: #fef9e7 !important; color: #b7950b !important; }
.cat-evenement   { background: #eaf2fb !important; color: #1a5276 !important; }
.cat-acquisition { background: #eafaf1 !important; color: #1e8449 !important; }
.cat-exposition  { background: #fdf2f8 !important; color: #76448a !important; }
.cat-partenariat { background: #fef5e7 !important; color: #ca6f1e !important; }
.cat-general     { background: #f2f3f4 !important; color: #566573 !important; }

.timeline-dot.cat-creation    { background: #f1c40f; box-shadow: 0 0 0 2px #f1c40f; }
.timeline-dot.cat-evenement   { background: #2980b9; box-shadow: 0 0 0 2px #2980b9; }
.timeline-dot.cat-acquisition { background: #27ae60; box-shadow: 0 0 0 2px #27ae60; }
.timeline-dot.cat-exposition  { background: #8e44ad; box-shadow: 0 0 0 2px #8e44ad; }
.timeline-dot.cat-partenariat { background: #e67e22; box-shadow: 0 0 0 2px #e67e22; }

/* ── LOGIN ── */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 2rem;
}
.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-card > i {
    font-size: 2.5rem;
    color: #1a4a7a;
    margin-bottom: 1rem;
}
.login-card h2 {
    color: #0a2342;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}
.login-card .form-group { text-align: left; }

/* ── DETAIL ÉVÉNEMENT ── */
.detail-section {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}
.back-btn { margin-bottom: 1.5rem; display: inline-flex; }
.detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
}
.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.detail-date {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.detail-card h2 {
    color: #0a2342;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}
.detail-photo {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    max-height: 450px;
}
.detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    border-top: 1px solid #eee;
    padding-top: 1.2rem;
    margin-bottom: 1.5rem;
}
.detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1.2rem;
    flex-wrap: wrap;
}

/* ── CARTE CLIQUABLE ── */
a.timeline-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
a.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
a.timeline-card::after {
    content: 'Voir le détail →';
    display: block;
    margin-top: 0.8rem;
    font-size: 0.82rem;
    color: #1a4a7a;
    font-weight: 600;
}

/* ── BADGE MODE ── */
.mode-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    pointer-events: none;
}
.mode-public {
    background: rgba(255,255,255,0.12);
    color: #aed6f1;
    border: 1px solid rgba(174,214,241,0.3);
}
.mode-admin {
    background: rgba(230,126,34,0.2);
    color: #f0a500;
    border: 1px solid rgba(230,126,34,0.5);
}

/* ── TABLE ADMINS ── */
.admins-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}
.admins-table th {
    background: #0a2342;
    color: #fff;
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
}
.admins-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eee;
}
.admins-table tr:hover td { background: #f4f6f9; }

/* ── APERÇU PHOTO FORMULAIRE ── */
.photo-preview {
    margin-top: 0.6rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dde4ec;
    background: #f4f6f9;
}
.photo-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    background: #f4f6f9;
}
.photo-preview small {
    display: block;
    padding: 0.4rem 0.6rem;
    color: #888;
    font-size: 0.78rem;
    border-top: 1px solid #dde4ec;
}
