/* ========== RESET DE BASE ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Tahoma, Verdana, sans-serif;
}

body {
    overflow: hidden;
}

/* ========== MODE NOSTALGIE ========== */
body.nostalgia-on #desktop {
    filter: sepia(0.12) saturate(1.1);
    position: relative;
}

body.nostalgia-on #desktop::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.08),
            rgba(0, 0, 0, 0.08) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: multiply;
    opacity: 0.35;
}

/* ========== BUREAU ========== */
#desktop {
    position: relative;
    width: 100%;
    height: 100%;
    background: #1e90ff;
    background-image: url('/bliss.jpg');
    background-size: cover;
    background-position: center;
    color: #000;
}

/* ========== ICÔNES BUREAU ========== */
.desktop-icons {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    cursor: default;
}

.desktop-icon img {
    width: 40px;
    height: 40px;
    display: block;
    margin: 0 auto 4px;
    image-rendering: pixelated;
}

.desktop-icon span {
    font-size: 11px;
    line-height: 1.1;
}

/* ========== FENÊTRES GÉNÉRIQUES ========== */
.window {
    position: absolute;
    top: 120px;
    left: 220px;
    width: 720px;
    min-height: 260px;
    background: #ece9d8;
    border: 2px solid #3a6ea5;
    border-radius: 6px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
    display: none;
}

.titlebar {
    height: 26px;
    background: linear-gradient(180deg, #7f9db9, #637f9f);
    border-bottom: 1px solid #15428b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    color: #fff;
    user-select: none;
    cursor: move;
    border-radius: 4px 4px 0 0;
}

.window.active .titlebar {
    background: linear-gradient(180deg, #3a6ea5, #24518f);
}

.title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
}

.title img {
    width: 16px;
    height: 16px;
}

.window-buttons {
    display: flex;
    gap: 4px;
}

.window-buttons button {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #0b223e;
    background: #e3e4e5;
    font-size: 11px;
    padding: 0;
    cursor: pointer;
}

.window-buttons button:hover {
    background: #fff;
}

.window-content {
    padding: 10px;
    font-size: 13px;
    color: #000;
}

/* ========== À PROPOS ========== */
.about-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
}

.about-photo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.about-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.about-text h1 {
    font-size: 20px;
    margin-bottom: 6px;
}

.about-text h2 {
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid #c0c0c0;
}

.about-text p {
    margin-bottom: 6px;
}

/* ========== LISTES GÉNÉRIQUES ========== */
ul {
    margin-left: 16px;
    margin-top: 4px;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-list li {
    background: #dbe9ff;
    border-radius: 999px;
    padding: 2px 8px;
    border: 1px solid #9fb8dd;
    font-size: 12px;
}

.two-columns {
    columns: 2;
    column-gap: 24px;
}

/* ========== PROJETS ========== */
.projects-content h1 {
    font-size: 18px;
    margin-bottom: 10px;
}

.project-card {
    background: #fff;
    border-radius: 4px;
    border: 1px solid #c1c1c1;
    padding: 10px;
    margin-bottom: 10px;
}

.project-card h2 {
    font-size: 15px;
    margin-bottom: 4px;
}

.project-meta {
    font-size: 12px;
    color: #333;
    margin-bottom: 6px;
}

/* ========== CV ========== */
.cv-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cv-frame {
    border: 1px solid #c1c1c1;
    background: #fff;
    height: 380px;
}

.cv-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== CONTACT ========== */
.contact-content h1 {
    font-size: 18px;
    margin-bottom: 8px;
}

.contact-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fake-form label {
    display: block;
    font-size: 12px;
    margin: 4px 0 2px;
}

.fake-form input,
.fake-form textarea {
    width: 100%;
    border: 1px solid #a0a0a0;
    padding: 4px;
    font-size: 12px;
    font-family: inherit;
    margin-bottom: 4px;
    background: #fff;
}

/* ========== MAIL EPSI ========== */
.mail-header {
    font-size: 12px;
    background: #d4dff5;
    border: 1px solid #a3b5e7;
    padding: 6px;
    margin-bottom: 8px;
}

.mail-body p {
    margin-bottom: 6px;
}

/* ========== BOUTONS GÉNÉRIQUES ========== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid #0b3b82;
    background: linear-gradient(#ffffff, #dbe6ff);
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    margin-top: 6px;
}

.btn-secondary {
    border-color: #555;
    background: linear-gradient(#f5f5f5, #d9d9d9);
}

.btn-primary:hover,
.btn-secondary:hover {
    filter: brightness(1.05);
}

.small {
    font-size: 11px;
    padding: 2px 8px;
}

/* ========== BARRE DES TÂCHES XP ========== */
#taskbar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 32px;
    width: 100%;
    background: linear-gradient(#3a6ea5, #24518f);
    border-top: 1px solid #0b3b82;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    color: #fff;
    font-family: Tahoma, sans-serif;
    font-size: 11px;
}

#start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 14px;
    border-radius: 6px;
    background: linear-gradient(to bottom, #9BCF4A 0%, #6DB03C 50%, #3E7D22 100%);
    border: 1px solid #2E6A17;
    box-shadow: inset 0 1px 1px #D7F1A3;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 1px 1px 0 #28590B;
}

#start-button .start-logo {
    background: #fefefe;
    color: #1b6ac8;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#start-button .start-logo img {
    width: 14px;
    height: 14px;
}

#taskbar-windows {
    flex: 1;
    display: flex;
    gap: 4px;
    padding: 0 6px;
}

.taskbar-button {
    min-width: 120px;
    max-width: 200px;
    padding: 2px 6px;
    background: linear-gradient(#e4f0ff, #c3d9ff);
    border-radius: 3px;
    border: 1px solid #0b3b82;
    color: #000;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.taskbar-button span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-button.active {
    background: linear-gradient(#fff9d8, #f2e29f);
    border-color: #b38b00;
}

#taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#clock {
    font-size: 11px;
}

/* ========== MENU DEMARRER XP REMASTER ========== */
#start-menu {
    position: absolute;
    left: 6px;
    bottom: 34px;
    width: 900px;
    min-height: 600px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #1f396d;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48);
    display: none;
    color: #000;
    font-size: 15px;
    z-index: 9999;
}

#start-menu.open {
    display: block;
}

.start-header {
    height: 88px;
    background: linear-gradient(180deg, #4d76d4 0%, #3050a5 55%, #243a78 100%);
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #fff;
}

.start-header-left img {
    width: 62px;
    height: 62px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
}

.start-header-right {
    margin-left: 14px;
}

.start-header-name {
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.start-header-sub {
    font-size: 13px;
    opacity: 0.95;
}

.start-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    background: linear-gradient(90deg, #f4f4f4 0%, #ffffff 100%);
    padding: 14px;
    gap: 14px;
}

.start-left,
.start-right {
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #d0d0d0;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    min-height: 450px;
}

.start-section-title {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 3px;
}

.start-menu-list {
    list-style: none;
}

.start-menu-list li {
    padding: 7px 8px;
    margin-bottom: 3px;
    border-radius: 4px;
    cursor: default;
    font-size: 15px;
}

.start-menu-list li:hover {
    background: #316ac5;
    color: #fff;
}

.start-menu-list-right li {
    font-size: 14px;
    color: #333;
}

.start-menu-list-right li:hover {
    background: #e8f0ff;
    color: #000;
}

/* ========== CLIPPY ASSISTANT ========== */
.clippy-content {
    font-size: 13px;
}

.clippy-layout {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: flex-start;
}

.clippy-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clippy-avatar img {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}

.clippy-bubble {
    background: #ffffe1;
    border: 1px solid #c0c080;
    border-radius: 8px;
    padding: 8px;
}

.clippy-bubble p {
    margin-bottom: 6px;
}

.clippy-bubble ul {
    margin-left: 16px;
    margin-top: 4px;
}

/* ========== MSN & YOUTUBE ========== */
.msn-content,
.youtube-content {
    font-size: 13px;
}

/* ===== MSN FENÊTRE ===== */
.msn-content {
    padding: 0;
    background: #f5f5f5;
    border-radius: 3px;
    border: 1px solid #c1c1c1;
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

/* Bandeau du haut MSN */
.msn-top-strip {
    height: 22px;
    background: linear-gradient(#fdfdfd, #e2e7f3);
    border-bottom: 1px solid #b6c3de;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 11px;
}

.msn-top-left {
    font-weight: bold;
}

.msn-top-right {
    color: #444;
}

/* Layout principal MSN */
.msn-main {
    display: grid;
    grid-template-columns: 1fr 150px;
    height: 260px;
}

/* Zone chat */
.msn-chat {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #d0d0d0;
    background: #ffffff;
}

.msn-messages {
    flex: 1;
    padding: 6px 8px;
    overflow-y: auto;
}

.msn-messages p {
    margin-bottom: 6px;
}

.msn-time {
    color: #888;
    font-size: 11px;
}

.msn-name {
    font-weight: bold;
}

.msn-name.cedric {
    color: #0b5cff;
}

.msn-name.malthael {
    color: #008000;
}

/* Barre basse (fake input) */
.msn-input-bar {
    border-top: 1px solid #d0d0d0;
    padding: 4px 6px;
    background: #f5f5f5;
}

.msn-input-fake {
    font-size: 11px;
    color: #777;
    font-style: italic;
}

/* Colonne droite : webcams */
.msn-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px;
    background: #f0f4ff;
    align-items: stretch;
}

.msn-webcam {
    flex: 0 0 130px;
    border: 1px solid #c0c0c0;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.msn-webcam-title {
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 4px;
}

.msn-webcam img {
    width: 100%;
    height: auto;
    max-height: 105px;
    object-fit: cover;
    display: block;
}

/* ========== POPUP MSN (TOAST) ========== */
.msn-toast {
    position: fixed;
    right: 12px;
    bottom: 44px; /* au-dessus de la barre des tâches */
    width: 260px;
    background: #f5f9ff;
    border: 1px solid #7ba7e1;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    font-size: 12px;
    color: #000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}

.msn-toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.msn-toast-header {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    background: linear-gradient(#ffffff, #dbe6ff);
    border-bottom: 1px solid #b5c9ee;
    border-radius: 6px 6px 0 0;
}

.msn-toast-header img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 6px;
}

.msn-toast-title {
    font-weight: bold;
    font-size: 12px;
}

.msn-toast-from {
    font-size: 11px;
    color: #444;
}

.msn-toast-body {
    padding: 6px 8px 8px 8px;
}

.msn-toast-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #5573a6;
    background: #e3e8f4;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

.msn-toast-close:hover {
    background: #ffffff;
}
