@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600&display=swap');

/* ========================================
   RESET ET STYLES DE BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a1d24;
    color: #e0d5c1;
    font-family: 'Crimson Pro', serif;
    font-size: 16px;
    min-height: 100vh;
    background: radial-gradient(circle at 50% -20%, #2b1832 0%, #1a1d24 70%);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Wrapper pour zoom responsive */
.wrapper {
    transform-origin: top center;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* ========================================
   TYPOGRAPHIE
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1em;
    color: #e0d5c1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

h1 { font-size: 2.5em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.4em; }

p {
    margin-bottom: 1em;
    color: rgba(224, 213, 193, 0.9);
}

/* ========================================
   BOUTONS
======================================== */
.button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #e0d5c1;
    background: rgba(44, 26, 49, 0.4);
    border: 1px solid rgba(224, 213, 193, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 12px 24px;
    font-family: 'Crimson Pro', serif;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 213, 193, 0.1), transparent);
    transition: left 0.5s ease;
}

.button:hover {
    background: rgba(44, 26, 49, 0.6);
    border-color: rgba(224, 213, 193, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.button:hover::before {
    left: 100%;
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Variantes de boutons */
.button-primary {
    background: rgba(45, 97, 61, 0.4);
    border-color: rgba(45, 97, 61, 0.3);
}

.button-primary:hover {
    background: rgba(45, 97, 61, 0.6);
    border-color: rgba(45, 97, 61, 0.5);
}

.button-danger {
    background: rgba(204, 44, 44, 0.4);
    border-color: rgba(204, 44, 44, 0.3);
}

.button-danger:hover {
    background: rgba(204, 44, 44, 0.6);
    border-color: rgba(204, 44, 44, 0.5);
}

.button-large {
    padding: 14px 32px;
    font-size: 1.05em;
}

.button-small {
    padding: 8px 16px;
    font-size: 0.85em;
}

/* Bouton rond pour retours */
.button-round {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    min-width: 32px;
    font-size: 1.4em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   FORMULAIRES
======================================== */
input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
    background: rgba(224, 213, 193, 0.05);
    border: 1px solid rgba(224, 213, 193, 0.2);
    color: #e0d5c1;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Crimson Pro', serif;
    font-size: 1em;
    width: 100%;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(224, 213, 193, 0.4);
    background: rgba(224, 213, 193, 0.08);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(224, 213, 193, 0.8);
    font-size: 0.95em;
}

/* ========================================
   CARDS ET CONTAINERS
======================================== */
.card {
    background: rgba(26, 29, 36, 0.6);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(224, 213, 193, 0.1);
    margin-bottom: 20px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(224, 213, 193, 0.1);
}

/* ========================================
   TABLES
======================================== */
.table-wrapper {
    background: rgba(26, 29, 36, 0.6);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(224, 213, 193, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(224, 213, 193, 0.1);
}

table th {
    background: rgba(42, 24, 16, 0.6);
    color: #e0d5c1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

table tr {
    transition: background-color 0.3s ease;
}

table tr:hover {
    background: rgba(42, 24, 16, 0.2);
}

/* ========================================
   MESSAGES ET NOTIFICATIONS
======================================== */
.msg {
    padding: 15px 25px;
    border-radius: 10px;
    margin: 20px auto;
    font-weight: 600;
    backdrop-filter: blur(4px);
    max-width: 600px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.msg-success {
    background: rgba(45, 97, 61, 0.1);
    border: 1px solid rgba(45, 97, 61, 0.3);
    color: #90eeb1;
}

.msg-error {
    background: rgba(204, 44, 44, 0.1);
    border: 1px solid rgba(204, 44, 44, 0.3);
    color: #ff9999;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SCROLLBAR PERSONNALISÉE
======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(224, 213, 193, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(224, 213, 193, 0.2);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(224, 213, 193, 0.3);
}

/* ========================================
   UTILITAIRES
======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }
    
    .card {
        padding: 15px;
    }
    
    table {
        font-size: 0.85em;
    }
    
    table th,
    table td {
        padding: 0.8rem;
    }
    
    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .wrapper {
        zoom: 1;
    }
}

@media (max-width: 480px) {
    .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px; /* Empêche le zoom sur iOS */
    }
}