/* GLOBAL RESET & BASE STYLES */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f8fcf8;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* BLazor Error UI - ESSENTIEL POUR LA VISIBILITÉ (doit être masqué par défaut) */
#blazor-error-ui {
    background: #f7f7f7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-top: 1px solid #ccc;
    bottom: 0;
    left: 0;
    height: 40px;
    padding: 10px 15px;
    position: fixed;
    width: 100%;
    z-index: 10000;
    display: none; /* <--- C'est la ligne cruciale pour qu'il soit masqué par défaut */
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.9rem;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
        color: #666;
    }

    #blazor-error-ui .reload {
        color: #007bff;
        text-decoration: underline;
        margin: 0 10px;
    }

/* Suppression des styles liés au Blazor Loading Progress car nous le commentons */
/*
.loading-progress { ... }
.loading-progress circle { ... }
.loading-progress circle:first-child { ... }
.loading-progress circle:last-child { ... }
.loading-progress-text { ... }
.loading-progress-text:after { ... }
#app.initialized { ... }
*/
/* Les styles ci-dessus sont maintenant inutiles et peuvent être supprimés ou commentés */
/* Je les ai laissés commentés pour montrer ce qui a été retiré */


/* Validation styles - Keep as is */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* ************************************************************ */
/* LAYOUT ADJUSTMENTS (from MainLayout.razor.css & app.css combined) */
/* These styles define the fundamental structure */
/* ************************************************************ */

/* .page is the main container for sidebar and content */
.page {
    position: relative;
    display: flex;
    flex-direction: column; /* Default for mobile first */
    min-height: 100vh; /* Ensures it takes at least full viewport height */
    background-color: #f8fcf8; /* A light background that flows */
}

/* Main content area (right of sidebar on desktop) */
main {
    flex: 1; /* Takes remaining space */
    display: flex; /* Use flexbox to stack top-row and article */
    flex-direction: column;
    background-color: #f8fcf8; /* Matches page/body for seamless look */
    padding: 0.5px; /* Remove default padding here so content can stretch */
}

/* Sidebar (left panel) */
.sidebar {
    background-image: linear-gradient(180deg, #3c6e44 0%, #a8d675 100%);
    flex-shrink: 0;
}

/* Top row (header bar above content) */
.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

    .top-row a, .top-row .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

        .top-row a:hover, .top-row .btn-link:hover {
            text-decoration: underline;
        }

        .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

/* The actual content area where @Body renders */
.content {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    flex-grow: 1;
    overflow-y: auto;
}


/* ************************************************************ */
/* MEDIA QUERIES (from MainLayout.razor.css) */
/* Ensure these are at the end for proper cascading */
/* ************************************************************ */

@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }

        .top-row a, .top-row .btn-link {
            margin-left: 0;
        }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

        .top-row.auth a:first-child {
            flex: 1;
            text-align: right;
            width: 0;
        }
}

/* ************************************************************ */
/* YOUR NEW NATURE-THEMED STYLES (from previous response) */
/* Add all of these below the media queries in app.css */
/* ************************************************************ */

/* Typographie */
.display-4 {
    font-size: 2.8rem;
    font-weight: 600;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

    .section-title::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        width: 60px;
        height: 3px;
        background-color: #78a855;
        border-radius: 5px;
    }

h5 {
    font-weight: 600;
    color: #4a4a4a;
}

.text-green {
    color: #55a055 !important;
}

.text-muted, .text-secondary {
    color: #6c757d !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-underline {
    text-decoration: underline;
}

/* Couleurs végétales et dégradés */
.nature-gradient {
    background: linear-gradient(135deg, #78a855 0%, #a8d675 100%);
}

.bg-light-green {
    background-color: #e6f7e6;
}

.bg-white-textured {
    background-color: #ffffff;
    background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23e0e0e0" fill-opacity="0.4" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zM6 5v1H5z"/%3E%3C/g%3E%3C/svg%3E');
}

.bg-success-light {
    background-color: #d4edda;
}

.bg-info-light {
    background-color: #d1ecf1;
}

.bg-warning-light {
    background-color: #fff3cd;
}

.text-success {
    color: #28a745;
}

.text-info {
    color: #17a2b8;
}

.text-warning {
    color: #ffc107;
}

.bg-green-dark {
    background-color: #3c6e44;
}

/* Boutons */
.btn-primary {
    background-color: #55a055;
    border-color: #55a055;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background-color: #438243;
        border-color: #438243;
        transform: translateY(-2px);
    }

.btn-outline-success {
    color: #55a055;
    border-color: #55a055;
    transition: all 0.3s ease;
}

    .btn-outline-success:hover {
        background-color: #55a055;
        color: white;
        transform: translateY(-1px);
    }

.btn-lg-custom {
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
}

.btn-grow {
    transition: transform 0.2s ease-in-out;
}

    .btn-grow:hover {
        transform: scale(1.05);
    }

/* Cartes et icônes */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.feature-card {
    border-radius: 15px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

/* Animations (add these, they are crucial for the dynamic feel) */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards ease-out;
}

    .animate-fade-in.delay-1 {
        animation-delay: 0.2s;
    }

    .animate-fade-in.delay-2 {
        animation-delay: 0.4s;
    }

    .animate-fade-in.delay-3 {
        animation-delay: 0.6s;
    }

.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s forwards ease-out;
}

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 0.8s forwards ease-out;
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 0.8s forwards ease-out;
}

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

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/*bloc login*/
/* Pour les logos ou icônes de grande taille */
.section-title-small {
    font-size: 2rem; /* Plus petit que le section-title standard */
    font-weight: 600;
    color: var(--dark-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

    .section-title-small::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 40px; /* Longueur de la ligne plus courte */
        height: 2px;
        background-color: var(--green-main);
        border-radius: 1px;
    }

/* Pour les liens sous le formulaire */
.hover-underline {
    position: relative;
}

    .hover-underline::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px; /* Positionnement du trait */
        width: 0%;
        height: 2px;
        background-color: currentColor; /* Prend la couleur du texte */
        transition: width 0.3s ease-in-out;
    }

    .hover-underline:hover::after {
        width: 100%;
    }

/* Assurez-vous que les classes suivantes sont définies: */
/* .animate-fade-in, .animate-slide-up, .btn-grow, .btn-lg-custom, .bg-white-textured, .text-green, .text-dark-green */
/* .form-control-custom (si vous ne l'avez pas déjà copié depuis l'historique) */

/* Optionnel: pour les coins arrondis plus prononcés sur les cartes */
.rounded-lg {
    border-radius: 0.75rem !important; /* Ou la valeur que vous préférez */
}

/*Custom color*/
/* Couleurs custom (assurez-vous d'avoir toutes ces variables) */
:root {
    --green-main: #28a745;
    --light-green: #e9f5e9;
    --success-light: #d4edda;
    --warning-light: #fff3cd;
    --info-light: #d1ecf1;
    --dark-green: #1e7e34;
    --text-green: var(--green-main);
    --white-75: rgba(255, 255, 255, 0.75);
    --textured-bg-color: #fcfcfc;
    --green-accent: #a8d7a8;
    --problem-accent: #f8d7da;
    --muted-darker: #555; /* Nouvelle couleur pour un texte muted un peu plus foncé */
}

/* Nouvelle classe pour un texte muted un peu plus foncé, si nécessaire */
.text-muted-darker {
    color: var(--muted-darker) !important;
}

/* Assurez-vous d'avoir déjà ces classes, comme indiqué précédemment : */
/* .section-title-small, .btn-lg-custom, .btn-grow, .bg-white-textured, .form-control-custom, .hover-underline */
/* .animate-fade-in, .animate-slide-up */

/* Pour forcer les coins de la carte principale à être arrondis et cacher le débordement des colonnes internes */
.rounded-lg {
    border-radius: 0.75rem !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

/* Ligne de séparation de couleur verte */
.divider-green {
    border: none;
    height: 2px;
    background-color: var(--green-accent); /* Couleur verte douce pour le séparateur */
    opacity: 0.75;
}

/*section payment result*/
/* Styles pour les animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Styles pour les couleurs des fonds d'icônes, si ce n'est pas déjà défini */
.bg-primary-light {
    background-color: rgba(0, 123, 255, 0.1);
}
/* Bleu clair */
.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1);
}
/* Vert clair */
.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.1);
}
/* Jaune clair */
.bg-info-light {
    background-color: rgba(23, 162, 184, 0.1);
}
/* Bleu ciel clair */
.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}
/* Rouge clair */

/* Pour les titres du tableau de bord et les icônes */
.text-dark-green {
    color: #28a745; /* Bootstrap success color, ou une autre teinte de vert foncé */
}

/* Ajustements pour les cartes de tableau de bord pour un look cohérent */
.dashboard-card {
    border-radius: 0.75rem; /* Coins arrondis */
}
