/* ==========================
   RISOTOOLS
   ========================== */

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

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f4f5f7;
    color: #333;
    min-height: 100vh;
    padding: 30px;
}

h1 {
    text-align: center;
    color: #5A189A;
    margin-bottom: 30px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.page-menu {
    margin-top: 80px;
}

/* ==========================
   BOUTONS
   ========================== */

.btn,
button {
    display: inline-block;
    background-color: #7B2CBF;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    margin: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover,
button:hover {
    background-color: #5A189A;
    transform: translateY(-2px);
}

.btn:active,
button:active {
    transform: translateY(0);
}

/* ==========================
   FORMULAIRES
   ========================== */

form {
    max-width: 900px;
    margin: auto;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 14px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #7B2CBF;
    box-shadow: 0 0 4px rgba(123, 44, 191, 0.4);
}

/* ==========================
   GRILLE POUR dmadd
   ========================== */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

/* ==========================
   ZONE DE TRAITEMENT
   ========================== */

.submit-zone {
    text-align: center;
    margin-top: 30px;
}

.submit-zone button {

    border: none;

    border-radius: 16px;

    background: #5e1ea6;

    color: white;

    padding: 14px 40px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: all .25s ease;
}

.submit-zone button:hover {

    background: #6f2bc2;

    transform: translateY(-2px);
}

.message {
    max-width: 900px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ==========================
   PIED DE PAGE
   ========================== */

.footer {
    text-align: center;
    margin-top: 30px;
    color: #777;
    font-size: 13px;
}


/* ==========================
   PAGE D'ACCUEIL
   ========================== */

.main-title {
    font-size: 48px;
    font-weight: 700;
    color: #5A189A;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}


/* =========================
   Layout
   ========================= */

.layout {
    display: flex;
    min-height: 100vh;
}


/* =========================
   Sidebar
   ========================= */

.sidebar {

    width: 280px;

    background: #ffffff;

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);

    padding: 20px;

    flex-shrink: 0;

    position: sticky;

    top: 0;

    height: 100vh;

    overflow-y: auto;
}


/* =========================
   Header menu
   ========================= */

.sidebar-header {

    margin-bottom: 30px;
}

.sidebar-logo {

    width: 54px;

    height: 54px;

    border-radius: 16px;

    background: #5e1ea6;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

    font-weight: bold;
}

.sidebar-title {

    margin-top: 12px;

    font-size: 28px;

    font-weight: 700;

    color: #5e1ea6;
}


/* =========================
   Menu principal
   ========================= */

.menu-item,
.menu-toggle {

    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 16px;

    margin-bottom: 8px;

    border: none;

    border-radius: 14px;

    background: transparent;

    color: #333;

    text-decoration: none;

    cursor: pointer;

    transition: all .25s ease;

    font-size: 15px;
}

.menu-item:hover,
.menu-toggle:hover {

    background: #f2ebfd;

    color: #5e1ea6;
}

.menu-item.active {

    background: #5e1ea6;

    color: white;

    font-weight: 600;
}


/* =========================
   Icônes
   ========================= */

.menu-left {

    display: flex;

    align-items: center;

    gap: 10px;
}

.nav-icon {

    width: 20px;

    height: 20px;

    stroke: currentColor;
}


/* =========================
   Flèche
   ========================= */

.arrow {

    transition: transform .25s ease;
}

.arrow.rotate {

    transform: rotate(90deg);
}


/* =========================
   Sous-menu
   ========================= */

.submenu {

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    transition:
        max-height .3s ease,
        opacity .3s ease;

    margin-left: 12px;
}

.submenu.open {

    max-height: 600px;

    opacity: 1;
}

.submenu a {

    display: block;

    padding: 10px 14px;

    margin-bottom: 4px;

    border-radius: 10px;

    text-decoration: none;

    color: #666;

    transition: all .25s ease;
}

.submenu a:hover {

    background: #f2ebfd;

    color: #5e1ea6;
}

.submenu a.active {

    background: #5e1ea6;

    color: white;

    font-weight: 600;
}


/* =========================
   Contenu
   ========================= */

.content {

    flex: 1;

    padding: 20px 40px;

    align-self: flex-start;
}


/* =========================
   Formulaire
   ========================= */

.form-grid {

    background: white;

    border-radius: 24px;

    padding: 35px;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.05),
        0 12px 24px rgba(0,0,0,0.05);

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}

.full-width {

    grid-column: 1 / -1;
}


/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {

    .layout {

        flex-direction: column;
    }

    .sidebar {

        width: 100%;

        height: auto;

        position: static;
    }

    .content {

        padding: 15px;
    }

    .form-grid {

        grid-template-columns: 1fr;

        padding: 20px;
    }
}
