/* ========== VARIABLES ========== */
:root {
    /* Couleurs principales */
    --primary-color: #8B0000;       /* Rouge fonc� japonais */
    --primary-light: #a52a2a;       /* Rouge plus clair */
    --secondary-color: #D4AF37;     /* Or */
    --accent-color: #E6B422;        /* Or clair */
    --background-light: #FFF5EE;    /* Coquille antique */
    --background-dark: #2F4F4F;     /* Gris ardoise fonc� */
    --text-dark: #2F4F4F;           /* Gris ardoise fonc� */
    --text-light: #F5F5DC;          /* Beige clair */
    --border-color: #A0522D;        /* Marron sienne */
    --success-color: #28a745;       /* Vert succ�s */
    --error-color: #dc3545;         /* Rouge erreur */
    --warning-color: #ffc107;       /* Jaune avertissement */
    --info-color: #17a2b8;          /* Bleu info */
    
    /* Espacements */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    
    /* Bordures */
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========== R�INITIALISATION ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    background-image: url('../img/sakura-bg.png');
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== TYPOGRAPHIE ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--spacing-md));
}

.col {
    flex: 1;
    padding: 0 var(--spacing-md);
}

/* ========== COMPOSANTS ========== */
/* Carte */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-title {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Variations de boutons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #c9a227;
    border-color: #c9a227;
    color: var(--text-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Tailles de boutons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Formulaires */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--text-dark);
    background-color: #fff;
    border-color: var(--accent-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(230, 180, 34, 0.25);
}

/* Alertes */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Tableaux */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-dark);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10rem;
}

.badge-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.badge-secondary {
    color: #fff;
    background-color: var(--secondary-color);
}

/* ========== LAYOUT SP�CIFIQUE ========== */
/* En-t�te */
.header {
    background: linear-gradient(135deg, var(--primary-color), #5C0000);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('../img/pattern.png') repeat;
    opacity: 0.1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    text-decoration: none;
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: var(--spacing-md);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Pied de page */
.footer {
    background: linear-gradient(135deg, var(--primary-color), #5C0000);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Page de connexion */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

.login-card {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), #5C0000);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* P�tales de cerisier */
.sakura {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ffb6c1;
    border-radius: 50% 0;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1000;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== R�ACTIVIT� ========== */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        margin: 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Pied de page */
.main-footer {
    background: #343a40;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #adb5bd;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    padding-top: 70px; /* Ajoutez cette ligne pour éviter que le contenu ne soit caché sous la barre de navigation */
}

/* En-tête */
.main-header {
    background: linear-gradient(135deg, #8B0000, #a52a2a);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo i {
    margin-right: 0.5rem;
    color: #D4AF37;
}

/* Navigation principale */
.main-nav {
    display: flex;
    gap: 1.5rem;
    margin: 0 2rem;
}

.main-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.main-nav a i {
    font-size: 1.1rem;
}

/* Menu utilisateur */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

.btn-logout {
    color: white;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
    color: #ffd700;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Contenu principal */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Styles responsifs */
@media (max-width: 1200px) {
    .main-header .container {
        padding: 0 1.5rem;
    }
    
    .main-nav {
        gap: 0.75rem;
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #8B0000;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .user-menu {
        margin-left: auto;
    }
}

@media (max-width: 576px) {
    .main-header .container {
        padding: 0 1rem;
    }
    
    .logo span {
        display: none;
    }
    
    .user-name span {
        display: none;
    }
}

.modal-content {
    background-color: #2c3e50; /* Couleur de fond de la modale */
    color: #ffffff; /* Couleur du texte */
}

.modal-header, .modal-footer {
    border-color: #ff0000; /* Couleur des bordures */
}

.modal-header .btn-close {
    filter: invert(1); /* Inverse la couleur de la croix pour qu'elle soit visible */
}

.table > :not(:first-child) {
    border-top: 2px solid #000;
}

/* Ou pour une approche plus spécifique */
.table > tbody > tr {
    border-top: 2px solid #000;
}

/* Pour éviter la double bordure sur le premier élément */
.table > tbody > tr:first-child {
    border-top: none;
}