/* ─────────────────────────────────────────────────────────────────────────────
   Espace Professionnel – Brasserie Voltige
   Palette et typographie alignées sur le site brasserie-voltige.fr
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --bg:        #faf8f2;
    --white:     #ffffff;
    --cream:     #f4efe6;
    --ink:       #1d2428;
    --dark:      #24343c;
    --muted:     #5b6a6f;
    --green:     #5B9583;
    --green-dk:  #4a7f6f;
    --gold:      #c6a756;
    --line:      rgba(29, 36, 40, 0.12);
    --radius:    20px;
    --shadow:    0 16px 36px rgba(20, 31, 36, 0.08);
    --shadow-lg: 0 22px 52px rgba(18, 29, 34, 0.18);
    --font-body: 'Manrope', sans-serif;
    --font-head: 'Cormorant Garamond', serif;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════
   PAGES D'AUTHENTIFICATION  (index.php, verify.php)
   ══════════════════════════════════════════════════════════════════════════ */

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 80% 0%, #f2ecde 0%, var(--bg) 48%, #f7f3ea 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.75rem 2.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

/* Logo */
.auth-logo {
    display: block;
    height: 56px;
    margin: 0 auto 2rem;
}

/* Titres */
.auth-card h1 {
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    margin-bottom: 0.35rem;
}
.auth-card .subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 2rem;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.45rem;
}
.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.form-group input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(91, 149, 131, 0.15);
}
/* Champ OTP – grands chiffres espacés */
input.otp-input {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.6rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Bouton principal */
.btn-primary {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}
.btn-primary:hover {
    background: var(--green-dk);
    box-shadow: 0 12px 28px rgba(91, 149, 131, 0.35);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* Alertes */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid transparent;
}
.alert-error   { background: #fff2f2; color: #c0392b; border-color: #c0392b; }
.alert-success { background: #f0fdf6; color: #1d7a4b; border-color: #27ae60; }
.alert-info    { background: #f0f7ff; color: #1a6fad; border-color: #3498db; }

/* Liens secondaires sous le formulaire */
.auth-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.auth-links a {
    color: var(--green);
    font-weight: 600;
    transition: color 0.15s;
}
.auth-links a:hover { color: var(--green-dk); }

/* Email mis en évidence sur verify.php */
.highlighted-email {
    font-weight: 700;
    color: var(--dark);
}

/* Pied de carte */
.auth-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGE FICHIERS  (files.php)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Barre de navigation ──────────────────────────────────────────────────── */
.files-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header-logo {
    height: 38px;
    flex-shrink: 0;
}
.header-spacer { flex: 1; }
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.role-badge {
    display: inline-block;
    background: var(--cream);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
}
.logout-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    transition: border-color 0.2s, color 0.2s;
}
.logout-link:hover { color: var(--dark); border-color: var(--dark); }

/* ── Contenu principal ────────────────────────────────────────────────────── */
.files-main {
    max-width: 780px;
    margin: 2.5rem auto;
    padding: 0 1.5rem 4rem;
}

/* ── Navigation onglets ───────────────────────────────────────────────────── */
.files-tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto 0;
    max-width: 780px;
    padding: 0 1.5rem;
}
.tab-link {
    flex: 1;
    padding: 1.1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    background: rgba(29, 36, 40, 0.03);
    border: 1.5px solid var(--line);
    border-radius: 14px 14px 0 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: none;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.tab-link:hover {
    color: var(--dark);
    background: rgba(29, 36, 40, 0.08);
    border-color: rgba(29, 36, 40, 0.2);
}
.tab-link.active {
    color: var(--white);
    background: linear-gradient(125deg, var(--green) 0%, var(--green-dk) 100%);
    border-color: var(--green);
    box-shadow: 0 8px 20px rgba(91, 149, 131, 0.3);
    transform: translateY(-2px);
}
.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--green);
    border-radius: 0 0 2px 2px;
}

.files-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}
.files-intro {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

/* ── Section / catégorie ──────────────────────────────────────────────────── */
.file-section {
    margin-bottom: 2.5rem;
}
.category-title {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--green);
    margin-bottom: 0.875rem;
}

/* ── Liste de fichiers ────────────────────────────────────────────────────── */
.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    box-shadow: 0 2px 8px rgba(20, 31, 36, 0.055);
    transition: box-shadow 0.2s, transform 0.15s;
}
.file-item:hover {
    box-shadow: 0 8px 22px rgba(20, 31, 36, 0.1);
    transform: translateY(-1px);
}
.file-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    opacity: 0.85;
}
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-ext {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--cream);
    color: var(--muted);
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1.1rem;
    background: var(--green);
    color: var(--white);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-download:hover {
    background: var(--green-dk);
    box-shadow: 0 6px 16px rgba(91, 149, 131, 0.35);
}

/* Message "aucun fichier" */
.no-files {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    padding: 3rem 0;
}

/* ── Icônes par type de fichier ───────────────────────────────────────────── */
/* (utilisées via la classe sur .file-icon) */

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    .files-header {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    .user-info { display: none; }
    .files-main { margin-top: 1.5rem; }
    .file-item { flex-wrap: wrap; }
    .file-icon { display: none; }
    .btn-download { margin-left: auto; }
}
