@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Shadows+Into+Light&display=swap');

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

:root {
    --primary-green: #96be25;
    --primary-blue: #2596BE;
    --primary-purple: #BE2596;
    --light-green: #b8d149;
    --light-blue: #4badce;
    --light-purple: #d149b8;
    --dark-green: #7a9e1f;
    --dark-blue: #1e7a9e;
    --dark-purple: #9e1f7a;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
    min-height: 100vh;
    color: var(--neutral-700);
    line-height: 1.6;
    font-weight: 400;
    /* background-image: url('bg.jpeg'); */
    background-size: cover;
    background-position: center bottom;
}

.logo {
    display: flex;
    flex-wrap: no-wrap;
    font-family: 'Nunito';
    font-size: 1.1em;
    line-height: 1em;
    letter-spacing: 2px;
    font-weight: bold;
    align-items: center;
    color: var(--neutral-800);

}

.header h1 {
    /* font-family: "Shadows Into Light", cursive; */
    color: var(--neutral-800);
    text-align: center;
    font-weight: 500;
    font-size: 2.5em;
    line-height: 1.2em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    background: rgba(255, 255, 255, .5);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;

}

.header a {

    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header_connecte {
    font-size: .8em;
    float: right;
    position: absolute;
    right: 30px;
    top: 4px;
}

.header .fa-check {
    /* color: #96be24; */
    position: absolute;
    font-size: 7em;
    left: -20px;
    top: -35px;

}

#impression {
    position: absolute;
    right: -5px;
    top: -5px;
    cursor: pointer;
    z-index: 9;
}



.page_index .header .fa-check,
.page_login .header .fa-check {
    opacity: 0;
    /* Cachée par défaut */
    transform: scale(0.5);
    animation: bounceIn 0.6s ease-out 1s forwards;
    /* 0.6s = durée de l'animation, 3s = délai avant démarrage */
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    60% {
        opacity: 1;
        transform: scale(1.2);
        /* Petit dépassement pour rebond */
    }

    80% {
        opacity: 1;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}




.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.content-area {
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 32px;
    min-height: 500px;
}

.btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.btn-le-blog {
    position: absolute;
    right: 2px;
    bottom: 2px;
}

.btn-mini {
    padding: 6px 10px;
}

.btn:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
    color: #ffffff;
}

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

.btn-secondary {
    background: var(--primary-blue);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-blue);
    color: #ffffff;
}

.btn-danger {
    background: var(--primary-purple);
    color: white;
}

.btn-danger:hover {
    background: var(--dark-purple);
}

.btn-small {
    padding: 3px 5px;
    font-size: 12px;
}

.btn:disabled {
    background: var(--neutral-300);
    color: var(--neutral-500);
    cursor: not-allowed;
    transform: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    /* display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--neutral-700); */

    display: block;
    font-weight: 300;
    color: #818699;
    letter-spacing: .07em;
    font-size: .6em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--neutral-200);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
    font-family: 'Roboto', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
}

select.form-control {
    cursor: pointer;
}

.login-form,
.register-form {
    max-width: 400px;
    margin: 0 auto;
}

.user-info {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-bottom: 25px;
}

.card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.card_modele {
    background-size: cover;
    background-position: center;
    padding-top: 100px;
    padding-bottom: 100px;
    position: relative;
}

.card_modele:before {
    border-radius: 8px;
    display: block;
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

.card_modele>div {
    color: #ffffff;
}

.card_modele a h3,
.card_modele a:hover {
    line-height: 1.3em;
    color: #ffffff !important;
}

.card_modele a {
    color: #ffffff;
}

.card:hover {
    border-color: var(--neutral-300);
    transform: translateY(-2px);
}

/* Style spécifique pour les objets dans objets.php */
.sortable-item.card {
    padding: 12px;
    margin-bottom: 8px;
}

.sortable-item .ordre-display {
    font-size: 12px;
    color: var(--neutral-500);
    font-weight: 400;
}

.sortable-item h4 {
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.3;
}

.sortable-item p {
    margin-bottom: 0;
    line-height: 1.2;
}

.object-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    transition: all 0.2s ease;
}

.object-item:hover {
    background: var(--neutral-100);
    border-color: var(--neutral-300);
}

.object-item.checked {
    background: var(--neutral-200);
    color: var(--neutral-500);
    opacity: 0.7;
}

.object-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary-green);
}

.category-title {
    background: var(--primary-green);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    /* margin: 16px 0 8px 0; */
    font-weight: 500;
    font-size: 15px;
}

.search-box {
    position: relative;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--neutral-200);
    border-top: none;
    border-radius: 0 8px 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border: 2px solid var(--primary-green);

}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--neutral-100);
    transition: background-color 0.15s ease;
}

.suggestion-item:hover {
    background-color: var(--neutral-50);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.slogan {
    max-width: 80%;
    margin: auto;
    margin-bottom: 20px;
    text-align: center;
}

.est_hidden {
    display: none !important;
}

.page_liste_detail_modele .filter-controls,
.page_liste_detail_modele .filter-controls-mobile {
    display: none;
}

.filter-controls,
.filter-controls-mobile {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-controls-mobile {
    margin-top: 15px;
}



.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-green);
}

.success-msg {
    background: #f0f9ff;
    color: var(--primary-blue);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #bae6fd;
    border-left: 4px solid var(--primary-blue);
}

.error-msg {
    background: #fef2f2;
    color: var(--primary-purple);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--primary-purple);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--neutral-200);
}

.table th {
    background: var(--neutral-50);
    font-weight: 500;
    color: var(--neutral-700);
}

.table tr:hover {
    background: var(--neutral-50);
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    background: var(--neutral-100);
    color: var(--neutral-600);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--neutral-200);
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--neutral-200);
}

.close {
    color: var(--neutral-400);
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 16px;
    right: 20px;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--neutral-600);
}

.progress-bar {
    background: var(--neutral-200);
    border-radius: 6px;
    height: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    background: var(--primary-green);
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.stats {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    justify-content: center;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 500;
    color: var(--primary-green);
    display: block;
}

.stat-label {
    font-size: 14px;
    color: var(--neutral-500);
    margin-top: 4px;
}

/* Styles pour le drag & drop */
.drag-handle {
    cursor: grab !important;
    color: var(--neutral-400);
    font-size: 16px;
    padding: 6px;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: var(--primary-green);
}

.drag-handle:active {
    cursor: grabbing !important;
}

.sortable-ghost {
    opacity: 0.5;
    background: var(--neutral-100) !important;
    border: 2px dashed var(--primary-green) !important;
}

.sortable-chosen {
    background: var(--neutral-50) !important;
    border: 2px solid var(--primary-green) !important;
}

.sortable-drag {
    background: white !important;
    border: 2px solid var(--primary-green) !important;
    transform: rotate(2deg) !important;
}

.sortable-category {
    min-height: 0px;
    padding: 2px 0;
    margin-bottom: 20px;
}

.sortable-item {
    transition: all 0.2s ease;
}

.sortable-item:hover {
    transform: translateY(-1px);
}

/* Amélioration des object-item pour le drag & drop */
.object-item {
    position: relative;
}

.object-item .drag-handle {
    width: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--neutral-300);
    margin-right: 8px;
}

.object-item .drag-handle:hover {
    color: var(--primary-green);
}

/* Drag handle spécifique pour objets.php */
.sortable-item .drag-handle {
    width: 18px;
    font-size: 12px;
    margin-right: 6px;
}

/* Navigation utilisateur */
.nav-buttons span {
    color: var(--neutral-600);
    font-size: 14px;
    padding: 0 12px;
}

/* Titres de sections */
h2,
h3,
h4 {
    color: var(--neutral-800);
    margin-bottom: 16px;
    font-weight: 500;
    line-height: 1.2em;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* Liens */
a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--dark-blue);
}

.titre_liste {
    text-decoration: none;
    color: var(--primary-green);
    display: inline-block;
    width: 100%;
    text-align: center;
}


/* Style spécial pour les liens de titre de liste */
.card a h3 {
    text-decoration: none;
    color: var(--primary-green);
    display: inline-block;
    width: 100%;
}

.card a:hover h3 {
    color: var(--primary-purple);
}

.checkbox-label {
    display: flex;
    width: 100%;
}

.checkbox-label>input {
    margin-right: 10px;

}

.checkbox-label>span {
    display: inline-block;
}

/* .listes_modeles {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.listes_modeles>div {
    width: 300px;
} */





/* MASONRY */
#objets-container {
    column-count: 3;
    column-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.container_category {

    min-width: 300px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

/* Mobile : 1 colonne */
@media (max-width: 768px) {
    #objets-container {
        column-count: 1;
    }

    .container_category {
        min-width: auto;
    }
}


/* Mobile responsive */
@media (max-width: 768px) {

    .btn {

        padding: 6px 10px;

    }

    .btn-le-blog {
        top: 3px;
        bottom: auto;
    }

    .card_modele {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .header .fa-check {

        font-size: 3em;
        left: -10px;
        top: -25px;
    }

    .header h1 {
        font-size: 2em;
        padding-top: 8px;
    }

    .slogan {
        max-width: 100%;
    }

    .btn-small {
        padding: 5px 10px;
        font-size: 14px;
    }

    #impression {
        display: none;
    }

    .object-item input[type="checkbox"] {
        width: 27px;
        height: 27px;
    }

    .filter-controls {
        display: none;
    }

    .container {
        padding: 16px;
    }

    .header {
        padding: 20px;
    }

    .content-area {
        padding: 24px;
    }

    .nav-buttons {
        /* flex-direction: column; */
        gap: 12px;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row {

        align-items: initial;
    }

    .stats {
        flex-direction: column;
        gap: 16px;
    }

    .drag-handle {
        font-size: 18px;
        padding: 8px;
    }

    .object-item .drag-handle {
        width: 28px;
        margin-right: 8px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 24px;
    }
}



/* Styles pour la popup d'information */
.info-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

.info-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.info-modal-header {
    background-color: var(--primary-blue);


    padding: 13px;
    border-bottom: 1px solid var(--dark-blue);
    ;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-modal-title {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

.info-modal-close {

    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.info-modal-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.info-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.6;
}

.info-empty {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

/* Styles pour le contenu HTML du texte */
.info-modal-body h1,
.info-modal-body h2,
.info-modal-body h3 {
    color: #495057;
    margin-top: 0;
}

.info-modal-body p {
    margin-bottom: 1rem;
}

.info-modal-body ul,
.info-modal-body ol {
    padding-left: 1.5rem;
}

.info-modal-body a {
    color: #007bff;
    text-decoration: none;
}

.info-modal-body a:hover {
    text-decoration: underline;
}