/* ═══════════════════════════════════════════════════════════════
   casting.tn — style.css
   Charte : Bleu nuit #0b1628 · Or #c8993a · Police Outfit
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&display=swap');

:root {
    --navy:       #0b1628;
    --navy2:      #0f1e38;
    --navy3:      #142444;
    --gold:       #c8993a;
    --gold-lt:    #deb05a;
    --gold-pale:  rgba(200,153,58,0.1);
    --gold-border:rgba(200,153,58,0.22);
    --white:      #ffffff;
    --text:       #dce4f0;
    --text-dim:   #7888a0;
    --bg:         #f4f6f9;
    --bg-card:    #ffffff;
    --border:     #e0e4ec;
    --input-focus:#c8993a;
    --danger:     #c8993a;
}

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

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    background-color: var(--bg);
    color: #2a2a27;
    line-height: 1.6;
    padding: 20px;
}

/* ── Container ───────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 10px;
}

/* ── Titres ──────────────────────────────────────────────────── */
h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--navy);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ── Boutons globaux ─────────────────────────────────────────── */
button,
input[type="submit"],
a.button {
    background-color: var(--gold);
    color: var(--navy);
    border: none;
    padding: 12px 28px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}
button:hover,
input[type="submit"]:hover,
a.button:hover {
    background-color: var(--gold-lt);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(200,153,58,0.28);
}
button:focus,
input[type="submit"]:focus,
a.button:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── Formulaires ─────────────────────────────────────────────── */
form { margin-top: 20px; }

form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--navy);
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.form-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}
.form-group input,
.form-group select { width: 100%; box-sizing: border-box; }

.form-row-align {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.form-group-inline {
    flex: 1 1 100px;
    display: flex;
    flex-direction: column;
}
.form-group-button {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
}
.form-group-button input[type="submit"] {
    padding: 12px 30px;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
}

/* Champs texte/select/textarea */
form input[type="text"],
form input[type="number"],
form input[type="date"],
form input[type="url"],
form input[type="email"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    color: #2a2a27;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-sizing: border-box;
    background-color: var(--white);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 15px;
    resize: vertical;
}
form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="date"]:focus,
form input[type="url"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,153,58,0.15);
}

/* ── Navigation ──────────────────────────────────────────────── */
/* Toutes les règles nav sont dans nav.php pour éviter les conflits */
/* On surcharge uniquement le focus accessible */
.nav-menu li a:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── Listes ──────────────────────────────────────────────────── */
ul { list-style: none; padding: 0; margin-bottom: 20px; }
ul li { padding: 0; border-bottom: none; }

/* ── Tables ──────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
table th, table td { padding: 12px; border: 1px solid var(--border); text-align: left; }
table th { background-color: var(--navy2); color: var(--text); font-weight: 500; }

/* ── Loader ──────────────────────────────────────────────────── */
#loader {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11,22,40,0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
#loader.active { display: flex; }
.spinner {
    border: 4px solid rgba(200,153,58,0.2);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Profils ─────────────────────────────────────────────────── */
.liste-profils {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
}
.profil-item {
    background: var(--bg-card);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}
.profil-item:hover,
.profil-item:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(200,153,58,0.15);
    border-color: var(--gold);
}
.profil-item a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.photo-profil { width: 100%; height: 280px; object-fit: cover; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.profil-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.profil-info h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--navy); font-weight: 600; }
.profil-info p { font-size: 0.88rem; color: #5a6070; margin-bottom: 6px; line-height: 1.4; }

/* ── Castings ────────────────────────────────────────────────── */
.casting-item {
    background: var(--bg-card);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}
.casting-item:hover,
.casting-item:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(200,153,58,0.15);
    border-color: var(--gold);
}
.casting-item a { color: inherit; text-decoration: none; flex-grow: 1; }
.casting-image { width: 100%; height: 280px; object-fit: cover; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.casting-title { font-weight: 700; color: var(--gold); margin: 12px 15px 6px; font-size: 1rem; }
.casting-dates { font-size: 0.85rem; color: #7888a0; margin: 0 15px 10px; }
.casting-excerpt { font-size: 0.9rem; color: #5a6070; margin: 0 15px 15px; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { margin-top: 30px; text-align: center; }
.pagination a,
.pagination strong {
    display: inline-block;
    margin: 0 5px;
    padding: 7px 14px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gold);
    border: 1px solid var(--gold-border);
    transition: background 0.2s ease, color 0.2s ease;
}
.pagination a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.pagination strong {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    cursor: default;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    body { padding: 10px; }

    nav a { display: block; margin-bottom: 10px; }

    table, table thead, table tbody,
    table th, table td, table tr { display: block; }
    table tr { margin-bottom: 15px; }
    table td { text-align: right; padding-left: 50%; position: relative; }
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }

    .form-row { flex-direction: column; }
    .form-row-align { flex-direction: column; }
    .form-group-inline, .form-group-button { flex: 1 1 100%; margin-left: 0; }
    .form-group-button { margin-top: 10px; align-items: stretch; }
    .form-group-button input[type="submit"] { width: 100%; }

    .liste-profils { grid-template-columns: 1fr; }
    .photo-profil { height: 220px; }
    .casting-image { height: 220px; }
}
