/* style.css - Thème Matrix clair / Verre translucide - Accents Bleus */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Inter:wght@300;400;500;600&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a1a1a 0%, #0a1520 100%);
    color: #d4f4ff;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Overlay plus clair pour effet verre */
.overlay, .overlay-dark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(30, 60, 80, 0.25), rgba(10, 25, 35, 0.4));
    backdrop-filter: blur(1px);
    z-index: -1;
}

/* Conteneur principal - effet verre bleuté */
.container, .master-container, .client-container {
    max-width: 1300px;
    margin: 30px auto;
    padding: 28px 32px;
    background: rgba(180, 220, 255, 0.08);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(80, 160, 220, 0.35);
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 20, 40, 0.3);
    /* Coins spécifiques : supérieur gauche + inférieur droit en 45deg */
	/* clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0px 100%);*/
	clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px);
    transition: all 0.3s ease;
}

/* Cartes / sections internes */
.card, section {
    background: rgba(30, 50, 70, 0.35);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(80, 170, 240, 0.4);
    padding: 22px;
    margin-bottom: 25px;
    /* Coins spécifiques */
	/* clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0px 100%); */
	clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px);
}

/* Typographie */
h1, h2, h3 {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 500;
    letter-spacing: 1px;
    color: #a0e0ff;
    text-shadow: 0 0 5px #1a5f7a;
    margin-bottom: 1.2rem;
}

h1 {
    font-size: 2.3rem;
    border-left: 4px solid #3a9fdf;
    padding-left: 20px;
}

h2 {
    font-size: 1.7rem;
    border-bottom: 1px solid #2a7fbf;
    display: inline-block;
    padding-bottom: 6px;
}

.subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #8fcbff;
    text-align: center;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Formulaires - inputs translucides */
input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    background: rgba(20, 40, 55, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(60, 160, 220, 0.6);
    color: #e8f4ff;
    font-family: 'Inter', monospace;
    font-size: 14px;
    transition: all 0.25s ease;
    border-radius: 0;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #5fc0ff;
    background: rgba(30, 60, 80, 0.85);
    box-shadow: 0 0 10px #2a8fcf;
}

/* Boutons */
button {
    width: auto;
	/*width: 100%;*/
    padding: 12px 18px;
    margin: 8px 0;
	clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0px 100%);
    background: rgba(30, 80, 110, 0.7);
    backdrop-filter: blur(5px);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid #4aafef;
    color: #e0f4ff;
    font-family: 'Inter', sans-serif;
    transition: 0.25s;
    border-radius: 0;
}

button:hover {
    background: #2a7fbf;
    border-color: #a0e0ff;
    box-shadow: 0 0 14px #3a9fdf;
    color: #ffffff;
}

/* Chat box - verre bleuté */
.chat-box {
    background: rgba(25, 55, 75, 0.45);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(80, 170, 240, 0.5);
    padding: 20px;
    margin: 20px 0;
}

#messages, #masterMessages {
    height: 360px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 14px;
    background: rgba(10, 30, 45, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    border: 1px solid rgba(70, 160, 220, 0.4);
}

.message {
    margin-bottom: 14px;
    padding: 10px 14px;
    backdrop-filter: blur(4px);
    word-wrap: break-word;
    border-left: 3px solid #3a9fdf;
}

.message.client {
    background: rgba(50, 100, 130, 0.45);
    text-align: right;
    border-left: none;
    border-right: 3px solid #5fc0ff;
}

.message.maitre {
    background: rgba(35, 75, 105, 0.5);
    text-align: left;
}

.chat-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    margin: 0;
    min-height: 70px;
}

.chat-input button {
    width: auto;
    padding: 12px 28px;
    height: 70px;
}

/* Runes - style verre / bleu clair */
.runes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 25px 0;
}

.rune-card {
    background: rgba(45, 90, 120, 0.55);
    backdrop-filter: blur(8px);
    border: 1px solid #5fb0ef;
    padding: 15px;
    width: 210px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    /* Coins spécifiques */
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 90% 100%, 0% 100%, 0% 10%);
}

.rune-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(60, 160, 220, 0.35);
    background: rgba(65, 115, 150, 0.7);
    border-color: #8fd0ff;
}

.rune-card strong {
    font-size: 1.5rem;
    font-family: 'Share Tech Mono', monospace;
    color: #c0ecff;
}

.position {
    font-size: 0.75rem;
    font-weight: 300;
    color: #b8dcff;
    letter-spacing: 0.5px;
}

.signification {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #e6f5ff;
}

/* Page client avec image de fond */
.client-page {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Master layout - version claire */
.master-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.consultation-list {
    flex: 1;
    min-width: 260px;
    background: rgba(30, 60, 85, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid #3a9fdf;
    padding: 20px;
}

.consultation-list ul {
    list-style: none;
    padding: 0;
}

.consultation-list li {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(40, 80, 110, 0.6);
    border-left: 3px solid #5fc0ff;
}

.consultation-list a {
    color: #cceeff;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.chat-master {
    flex: 3;
    min-width: 500px;
}

/* Badges statut */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
}
.status-attente { background: #7a6e2c; color: #fff; }
.status-en_cours { background: #2a7fbf; color: #fff; }
.status-terminee { background: #8f4f4f; color: #fff; }

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.75rem;
    color: #8fbfdf;
    border-top: 1px solid #2a7faf;
    padding-top: 20px;
}

/* Messages d'erreur / succès */
.error-message, .error {
    color: #ffb5b5;
    background: rgba(100, 40, 40, 0.5);
    padding: 8px;
    margin: 8px 0;
    border-left: 3px solid #ff7f7f;
}

.success {
    color: #b3ffd4;
    background: rgba(40, 90, 70, 0.5);
    padding: 8px;
}

/* Redirection */
.redirection-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 30, 0.92);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 3s ease-in-out forwards;
}

.redirection-content {
    background: rgba(40, 80, 110, 0.9);
    border: 1px solid #6fcfef;
    padding: 35px;
    max-width: 500px;
    text-align: center;
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 90% 100%, 0% 100%, 0% 10%);
}

@keyframes fadeOut {
    0% { opacity: 1; visibility: visible; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* Bouton d'impression personnalisé */
.btn-print {
    background: rgba(40, 100, 140, 0.8);
    border: 1px solid #5fc0ff;
}

.btn-print:hover {
    background: #2a8fcf;
}

/* ===== STYLES POUR L'IMPRESSION (conservés) ===== */
@media print {
    body * {
        visibility: hidden;
    }
    #printArea, #printArea * {
        visibility: visible;
    }
    #printArea {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: white;
        color: black;
        backdrop-filter: none;
    }
    .print-container {
        font-family: 'Inter', 'Times New Roman', serif;
        max-width: 800px;
        margin: 0 auto;
    }
    .print-container h1 {
        color: #1a5a7a;
        font-size: 24px;
        text-align: center;
    }
    .print-container h2 {
        color: #1a6f9f;
        font-size: 18px;
        margin-top: 20px;
        border-bottom: 1px solid #aaa;
    }
    .print-container .rune-card {
        border: 1px solid #111;
        background: #f4faff;
        color: #000;
        page-break-inside: avoid;
        display: inline-block;
        width: 200px;
        margin: 6px;
        padding: 10px;
        box-shadow: none;
    }
    .print-container .message {
        margin-bottom: 8px;
        padding: 6px;
        border-bottom: 1px solid #ccc;
    }
    .print-container .message.client {
        background: #e0f0ff;
    }
    .print-container .message.maitre {
        background: #d0e8ff;
    }
    hr {
        margin: 20px 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container, .master-container {
        margin: 15px;
        padding: 18px;
    }
    .master-layout {
        flex-direction: column;
    }
    .chat-master {
        min-width: auto;
    }
    .chat-input {
        flex-direction: column;
    }
    .chat-input button {
        width: 100%;
        height: auto;
    }
    h1 {
        font-size: 1.6rem;
    }
    .rune-card {
        width: 160px;
    }
}
/* Styles pour les images des runes */
.rune-image img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(95, 176, 239, 0.5));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.rune-card:hover .rune-image img {
    filter: drop-shadow(0 0 12px rgba(95, 176, 239, 0.9));
    transform: scale(1.05);
}