@charset "utf-8";

:root {
    --bg-cream: #F9F6F0;
    --bg-card: #FFFFFF;
    --text-dark: #202020;
    --text-muted: #6A6A6A;
    --brand-gold: #A88253;
    --brand-gold-hover: #8E6C41;
    --brand-custom: #C5A880; /* Nouvelle variable pour tes calendriers */
    --border-color: #EAE5DC;
}

body {
    background-color: var(--bg-cream);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    font-weight: 300;
}

/* --- Éléments de Titrage --- */
        .serif-title {
            font-family: 'Cormorant Garamond', serif;
            font-weight: 400;
            color: var(--text-dark);
        }
        .serif-title em {
            font-family: 'Cormorant Garamond', serif;
            font-style: italic;
            color: var(--brand-gold);
            font-weight: 400;
        }

/* --- Navbar Minimaliste --- */
.navbar-custom {
    background-color: var(--bg-cream);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}
.navbar-brand-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: var(--text-dark) !important;
    text-decoration: none;
}
.nav-link-custom {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}
.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--brand-gold) !important;
}

/* --- Boutons Style "Cap Sud" --- */
.btn-gold {
    background-color: var(--brand-gold);
    color: #FFFFFF;
    border: none;
    border-radius: 30px;
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.btn-gold:hover {
    background-color: var(--brand-gold-hover);
    color: #FFFFFF;
}

/* --- Tableaux Épurés --- */
.table-custom {
    background: var(--bg-card);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-top: 1rem;
}
.table-custom th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--text-dark);
    padding: 1.2rem 1rem;
    font-weight: 600;
}
.table-custom td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
}
.table-custom tr:hover td {
    background-color: #FAF9F6;
    cursor: pointer;
}

/* --- BOUTONS D'ACTION --- */
.btn-marron-plein-pilule {
    background-color: #4A3B32 !important;
    color: #FFFFFF !important;
    border: 1px solid #4A3B32 !important;
    font-size: 0.85rem !important;
    padding: 6px 20px !important;
    border-radius: 50px !important;
    transition: all 0.2s ease-in-out;
}
.btn-marron-plein-pilule:hover {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

/* --- FORMULAIRE & INPUTS --- */
.input-group:hover .input-group-text,
.input-group:hover .form-control {
    border-color: var(--brand-gold) !important;
}
.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: var(--brand-gold) !important;
}
.form-control:focus {
    box-shadow: none !important;
}

/* Personnalisation de la croix de suppression avec la couleur #8E6C41 */
#searchInput::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    /* Le code couleur est injecté ici via %238E6C41 */
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238E6C41'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E") no-repeat center center;
    cursor: pointer;
    margin-right: 5px;
}

/* --- PERSONNALISATION FLATPICKR --- */
.flatpickr-day.selected, 
.flatpickr-day.selected:hover,
.flatpickr-day.selected.inRange,
.flatpickr-day.selected.today {
    background: var(--brand-custom) !important;
    border-color: var(--brand-custom) !important;
    color: #FFFFFF !important;
}

.flatpickr-day:hover {
    background: var(--brand-custom) !important;
    color: #FFFFFF !important;
    border-color: var(--brand-custom) !important;
}

.flatpickr-day.today {
    border-color: var(--brand-custom) !important;
    color: #4A3B32;
}


 .hover-gold:hover {
        color: var(--brand-gold) !important;
        text-decoration: none !important;
    }
    
    /* Effet visuel discret sur l'en-tête de tri */
    .th-sortable:hover {
        color: #4A3B32;
    }
    .th-sortable:hover #sortIcon {
        color: #4A3B32 !important;
    }

   /* --- PAGINATION PREMIUM --- */
    .pagination {
        gap: 8px !important;
    }
    .pagination .page-item .page-link {
        color: #8E8377 !important;
        background-color: #FAF8F5 !important;
        border: 1px solid #EAE5DC !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
        box-shadow: none !important;
        transition: all 0.15s ease-in-out;
        cursor: pointer;
    }
    .pagination .page-item:not(.active) .page-link:hover {
        background-color: #F3EFE6 !important;
        color: #4A3B32 !important;
        border-color: #D5CDBD !important;
    }
    .pagination .page-item.active .page-link {
        background-color: #4A3B32 !important;
        border-color: #4A3B32 !important;
        color: #FFFFFF !important;
    }
    .pagination .page-item.disabled .page-link {
        background-color: #FAFAF9 !important;
        border-color: #F3EFE6 !important;
        color: #CCC5BD !important;
        opacity: 0.5;
        cursor: not-allowed;
    }
	
	/* Neutralisation radicale */
a, 
a:link, 
a:visited, 
a:hover, 
a:active, 
a:focus {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Cible spécifique pour tes liens de tableau */
#tableBeneficiaires a,
#tableBeneficiaires a:hover {
    text-decoration: none !important;
    color: inherit; /* Garde la couleur définie par ton texte */
}

/* S'assurer que les icônes (bi bi-...) ne sont pas impactées */
a i {
    text-decoration: none !important;
}

/* On supprime le comportement par défaut de Bootstrap */
.custom-select-sable:focus {
    border-color: #C5A880 !important;
    box-shadow: none !important; /* C'est cette ligne qui enlève le halo bleu */
}

/* Optionnel : si tu veux aussi enlever le bleu sur le survol (hover) */
.custom-select-sable:hover {
    border-color: #C5A880 !important;
}

.btn-outline-dark-custom {
            background-color: transparent;
            color: var(--text-dark);
            border: 1px solid var(--text-dark);
            border-radius: 30px;
            padding: 0.6rem 2rem;
            font-size: 0.9rem;
            transition: all 0.3s ease;
}
.btn-outline-dark-custom:hover {
	background-color: var(--text-dark);
    color: #FFFFFF;
}

.nav-link-main.active {
	border-bottom: 2px solid #A88253;
    color: #1A1A1A;
    font-weight: 600;
}

/* Style pour lier tes onglets au design épuré du reste de l'application */
    .custom-tab {
        color: #8A7A71 !important;
        border: 0 !important;
        border-bottom: 2px solid transparent !important;
        background-color: transparent !important;
        transition: all 0.2s ease-in-out;
        font-size: 0.9rem;
    }

    /* État au survol */
    .custom-tab:hover {
        color: #4A3B32 !important;
        border-bottom-color: #E6E1DA !important;
    }

    /* Onglet actif */
    .custom-tab.active {
        color: #4A3B32 !important;
        font-weight: 600 !important;
        border-bottom-color: #4A3B32 !important;
        background-color: transparent !important;
    }

    /* ---- CONFIGURATION DES COULEURS DU THÈME ---- */
    .text-theme-dark { color: #4A3B32 !important; }
    .text-theme-gold { color: #C5A880 !important; }
    .bg-theme-cream { background-color: #FAF8F5 !important; }
    
    .badge-theme-status {
        background-color: #FAF8F5 !important;
        color: #4A3B32 !important;
        border: 1px solid #E6E1DA !important;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    /* ---- ADAPTATIONS DATATABLES & STRIPED ---- */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0 !important;
        margin: 0 !important;
    }
    .dataTables_filter input {
        margin-left: 0.5em;
        display: inline-block;
        width: auto;
        background-color: #FAF8F5;
        border: 0;
        border-radius: 6px;
        padding: 0.35rem 0.75rem;
    }
    
    /* Encadré d'erreur ou mise en avant (ex: lignes spécifiques) */
    table.dataTable tr.table-warning-highlight {
        background-color: #fff3cd !important;
        box-shadow: inset 4px 0 0 0 #C5A880;
    }
    #table-historique tbody tr.table-warning-highlight td {
        background-color: #fff3cd !important;
        color: #664d03 !important;
    }
    #table-historique tbody tr.table-warning-highlight td:first-child {
        box-shadow: inset 5px 0 0 0 #C5A880 !important;
    }

    /* Personnalisation de l'en-tête du tableau de synthèse */
    .table-theme-header {
        background-color: #4A3B32 !important;
        color: #ffffff !important;
    }
    .table-theme-total {
        background-color: #FAF8F5 !important;
        color: #4A3B32 !important;
    }

	.btn-marron-outline {
				background-color: transparent;
				color: var(--brand-gold);
				border: 1px solid var(--brand-gold);
				border-radius: 30px;
				padding: 0.6rem 2rem;
				font-size: 0.9rem;
				transition: all 0.3s ease;
	}
	.btn-marron-outline:hover {
		background-color: var(--brand-gold-hover);
		color: #FFFFFF;
	}

    /* La ligne entière prend la couleur de fond */
    .table-warning-cloture {
        background-color: #FFFDF5 !important; /* Couleur vanille pastel */
    }
    
    /* On force les cellules à hériter de ce fond si nécessaire */
    .table-warning-cloture td {
        background-color: transparent !important; /* Laisse transparaître le fond du tr */
        color: #8C7B58 !important; /* Texte un peu plus chaleureux */
        font-weight: 600;
    }

    /* Le badge reste distinct */
    .badge-cloture {
        background-color: #FDF0D5 !important;
        color: #C5A880 !important;
        border: 1px solid #F6E6CA;
        font-size: 0.60rem !important;
        padding: 3px 7px !important;
        text-transform: uppercase;
        vertical-align: middle;
    }
	
/* Badge pastel assorti */
    .badge.bg-warning {
        background-color: #FDF0D5 !important;
        color: #C5A880 !important;
        border: 1px solid #F6E6CA;
        font-size: 0.60rem !important;
        padding: 4px 8px !important;
        text-transform: uppercase;
    }

.table-custom td {
    vertical-align: top !important;
}

