/* OSR Percussion — app.css v4.2
   Variables globales et styles communs à toutes les pages */

/* --------------------------------------------------------
   Variables
   -------------------------------------------------------- */
:root {
    --primary-start:   #667eea;
    --primary-end:     #764ba2;
    --primary-grad:    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-hover:   #5568d3;

    --text-dark:       #2c3e50;
    --text-mid:        #495057;
    --text-muted:      #666;
    --border:          #dee2e6;
    --bg-light:        #f8f9fa;
    --bg-page:         #f5f5f5;

    /* Couleurs séries (calendrier) */
    --serie-abonnement:       #4a90d9;
    --serie-opera-ballet:     #e67e22;
    --serie-cineconcert:      #9b59b6;
    --serie-estival:          #27ae60;
    --serie-scolaire-famille: #e74c3c;
    --serie-deplacement:      #1abc9c;
    --serie-extraordinaire:   #f39c12;
    --serie-enregistrement:   #7f8c8d;
    --serie-osr-cest-vous:    #2c3e50;
    --serie-default:          #95a5a6;
}

/* --------------------------------------------------------
   Reset minimal
   -------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
    margin: 0;
    padding: 0;
}

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

a {
    color: var(--primary-start);
}

a:hover {
    color: var(--primary-hover);
}

/* --------------------------------------------------------
   Page d'accueil — fond dégradé
   -------------------------------------------------------- */
body.page-home {
    background: var(--primary-grad);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --------------------------------------------------------
   Conteneurs génériques
   -------------------------------------------------------- */
.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------
   Header commun (pages publiques)
   -------------------------------------------------------- */
.page-header {
    background: var(--primary-grad);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.home-link {
    font-size: 2em;
    text-decoration: none;
    flex-shrink: 0;
}

/* --------------------------------------------------------
   Boutons
   -------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-grad);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.2s;
}

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

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-mid);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* --------------------------------------------------------
   Badges / pills
   -------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    background: var(--primary-grad);
}

.badge-neutral {
    background: #e9ecef;
    color: var(--text-mid);
}

/* --------------------------------------------------------
   Tables communes
   -------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-mid);
}

tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: var(--bg-light);
}

/* --------------------------------------------------------
   Messages de statut
   -------------------------------------------------------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

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

/* --------------------------------------------------------
   Lien retour accueil (🏠)
   -------------------------------------------------------- */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.back-home:hover {
    opacity: 1;
    color: white;
}

/* --------------------------------------------------------
   Footer commun
   -------------------------------------------------------- */
.site-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.85em;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* --------------------------------------------------------
   Responsive
   -------------------------------------------------------- */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.3rem;
    }

    .page-header {
        padding: 1rem;
    }

    table {
        font-size: 0.85rem;
    }

    thead th,
    tbody td {
        padding: 0.5rem;
    }
}
