/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7fc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #003366, #1a4b7a);
    color: #fff;
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.logo a:hover {
    transform: scale(1.02);
}

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: background 0.3s, transform 0.2s;
    font-size: 0.95rem;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.btn-insc {
    background: #ffb347;
    color: #003366 !important;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn-insc:hover {
    background: #ffa726;
    transform: scale(1.05);
}

.btn-deco {
    background: #e74c3c;
    color: #fff !important;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
}

.btn-deco:hover {
    background: #c0392b;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* MAIN */
main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
    animation: fadeIn 0.6s ease-in;
}

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

h1, h2, h3 {
    color: #003366;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #003366, #1a4b7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* BOUTONS */
.btn, .btn-primary {
    display: inline-block;
    background: #003366;
    color: #fff;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,51,102,0.2);
}

.btn:hover, .btn-primary:hover {
    background: #002244;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,51,102,0.3);
}

.btn-secondary {
    background: #ffb347;
    color: #003366;
}

.btn-secondary:hover {
    background: #ffa726;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

/* PAGE D'ACCUEIL */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #e6f0fa, #f4f7fc);
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    animation: fadeIn 1s;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero .choix {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .choix .btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    min-width: 220px;
}

/* CARTES */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* POSTES */
.poste {
    border-left: 5px solid #003366;
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.poste:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.poste h3 {
    margin-top: 0;
}

.poste .meta {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* FORMULAIRES */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1e293b;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
    background: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #003366;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* MESSAGES & ALERTES */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* TABLEAUX (admin) */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th {
    background: #003366;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 1rem;
    text-align: left;
}

td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* TICKETS / MESSAGES BUBBLES */
.message-bubble {
    max-width: 75%;
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    word-wrap: break-word;
}
.message-bubble.me {
    background: #003366;
    color: #fff;
    border-radius: 18px 18px 0 18px;
    margin-left: auto;
}
.message-bubble.other {
    background: #e9ecef;
    color: #1e293b;
    border-radius: 18px 18px 18px 0;
}

/* FOOTER */
footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 4px solid #003366;
    animation: fadeIn 0.8s;
}

footer p {
    margin: 0.2rem 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
        display: none;
        padding: 1rem 0;
    }
    nav ul.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero .choix {
        flex-direction: column;
        align-items: center;
    }
    .logo a span {
        font-size: 1rem;
    }
    .logo img {
        height: 40px;
    }
}