/* 
   Styles CSS pour l'application Cité Diaspora KK
   Design mobile-first et responsive
*/

/* Reset et variables CSS */
:root {
    --primary-color: #00853e;
    --secondary-color: #fcd116;
    --tertiary-color: #e31b23;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --white: #ffffff;
    --text-color: #333333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
    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-color);
    background-color: var(--light-color);
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #006830);
    color: var(--white);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    opacity: 0.95;
}

/* Navigation */
nav {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

nav li {
    margin: 0.5rem;
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
    font-weight: 500;
}

nav a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Section Présentation */
.presentation {
    text-align: center;
}

.presentation h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.presentation p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.presentation .highlight {
    background-color: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 133, 62, 0.1);
}

/* Checkbox et radio */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: auto;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #006830;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #e5bf14;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: #c41820;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    width: auto;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables admin */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
}

thead {
    background-color: var(--primary-color);
    color: var(--white);
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr:hover {
    background-color: rgba(0, 133, 62, 0.05);
}

/* Actions buttons */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions form {
    display: inline;
}

/* Admin header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #006830);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .card {
        padding: 2.5rem;
    }

    .btn {
        width: auto;
        min-width: 200px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-header {
        flex-wrap: nowrap;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    nav a {
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Accessibilité */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header,
    nav,
    footer,
    .actions,
    .admin-actions {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
