/* =========================================================================
 *  theme.css — Thème global de serveur.local
 *  Style « verre » bleu nuit avec orbes (identique à l'accueil / conditions).
 *  À lier sur toutes les pages :  <link rel="stylesheet" href="/assets/theme.css">
 * ========================================================================= */

:root {
    --bg-1: #07111f;
    --bg-2: #0b1f38;
    --bg-3: #103b52;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-2: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.12);
    --text: #eef6ff;
    --muted: #b8c7d9;
    --accent: #47c0ff;
    --accent-2: #1e90ff;
    --accent-3: #71ffd1;
    --danger: #ff6b6b;
    --warning: #f6d365;
    --ok: #69ff8a;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(71, 192, 255, 0.18), transparent 22%),
        radial-gradient(circle at 85% 15%, rgba(113, 255, 209, 0.14), transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(30, 144, 255, 0.18), transparent 24%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ----- Orbes décoratives ----------------------------------------------- */
.orbs { pointer-events: none; position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(28px); opacity: 0.16; animation: floatOrb 12s ease-in-out infinite; }
.orb.one   { width: 220px; height: 220px; background: #47c0ff; top: 12%; left: -60px; }
.orb.two   { width: 180px; height: 180px; background: #71ffd1; bottom: 12%; right: -40px; animation-delay: 2s; }
.orb.three { width: 120px; height: 120px; background: #1e90ff; top: 60%; left: 48%; animation-delay: 4s; }

/* ----- Conteneur ------------------------------------------------------- */
.page-shell {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 48px;
    animation: fadeUp 0.6s ease;
}
.page-shell.narrow { width: min(720px, calc(100% - 32px)); }
.page-shell.mid    { width: min(960px, calc(100% - 32px)); }

/* ----- Titres ---------------------------------------------------------- */
.page-title { margin: 4px 0 22px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.5px; font-weight: 700; }
.gradient-text {
    background: linear-gradient(90deg, #ffffff, #91dcff, #71ffd1);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.08); color: var(--accent-3); border: 1px solid rgba(255,255,255,0.10);
    font-size: 13px; margin-bottom: 16px;
}

/* ----- Cartes en verre ------------------------------------------------- */
.glass-card {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    padding: 22px 24px;
    margin-bottom: 22px;
    animation: fadeUp 0.7s ease;
}
.glass-card h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.3px; }
.glass-card h3 { margin: 0 0 10px; font-size: 17px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ----- Boutons --------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 44px; padding: 11px 18px; border-radius: 13px; text-decoration: none;
    cursor: pointer; border: 1px solid transparent; font-size: 14.5px; font-weight: 700;
    font-family: inherit;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #03111d; box-shadow: 0 12px 28px rgba(71,192,255,.25); }
.btn-secondary, .btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); border-color: rgba(255,255,255,0.10); }
.btn-secondary:hover, .btn-ghost:hover { background: rgba(71,192,255,0.14); }
.btn-success { background: linear-gradient(135deg, #34d399, #10b981); color: #042b1d; }
.btn-warning { background: linear-gradient(135deg, #fbbf77, #f59e0b); color: #3a2503; }
.btn-danger  { background: linear-gradient(135deg, #ff8a8a, var(--danger)); color: #2a0606; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ----- Formulaires ----------------------------------------------------- */
label.fld { display: block; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=search],
input[type=email], textarea, select {
    width: 100%; padding: 12px 14px; font: inherit;
    border: 1px solid rgba(255,255,255,0.14); border-radius: 14px;
    background: rgba(8, 18, 32, 0.55); color: var(--text); outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input::placeholder, textarea::placeholder { color: #9ab0c8; }
input:focus, textarea:focus, select:focus {
    border-color: rgba(71,192,255,0.55); box-shadow: 0 0 0 4px rgba(71,192,255,0.10);
}
textarea { min-height: 90px; resize: vertical; }
input[type=color] { padding: 3px; height: 44px; width: 70px; }
input[type=file] { padding: 10px; }

/* ----- Interrupteur on/off -------------------------------------------- */
.adm-switch { position: relative; display: inline-block; width: 52px; height: 28px; flex: 0 0 auto; }
.adm-switch input { opacity: 0; width: 0; height: 0; }
.adm-slider { position: absolute; inset: 0; cursor: pointer; background: rgba(255,255,255,0.18); border-radius: 999px; transition: .2s; }
.adm-slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.adm-switch input:checked + .adm-slider { background: #2ecc71; }
.adm-switch input:checked + .adm-slider::before { transform: translateX(24px); }

/* ----- Tableaux -------------------------------------------------------- */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 14px; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }

/* ----- Pastilles / flash ---------------------------------------------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.on  { background: rgba(105,255,138,0.18); color: #aef5be; }
.pill.off { background: rgba(255,107,107,0.18); color: #ffc2c2; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.flash.ok  { background: rgba(105,255,138,0.12); color: #c7ffd6; border-color: rgba(105,255,138,0.25); }
.flash.err { background: rgba(255,107,107,0.12); color: #ffd0d0; border-color: rgba(255,107,107,0.25); }
.flash.warn{ background: rgba(246,211,101,0.12); color: #ffeebb; border-color: rgba(246,211,101,0.25); }

a.link { color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; margin: 0; }

/* ----- Animations ------------------------------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .7; } }
@keyframes floatOrb { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-16px) translateX(10px); } }

@media (max-width: 640px) {
    .page-shell { width: calc(100% - 18px); margin: 16px auto 30px; }
    .glass-card { padding: 18px 16px; border-radius: 20px; }
}
