:root {
    --bg-main: #ffffff;       /* Noir bleuté très mat */
    --bg-card: #0f0d0a;       /* Gris-bleu flat pour les cartes */
    --brand-gold: #cca95c;    /* Cyan pur, utilisé par touches légères */
    --brand-purple: #7000ff;  /* Violet sombre pour les détails */
    --text-muted: #3d3e44;
    --text-muted-white: #cacddb;
}

body {
    background-color: var(--bg-main);
    color: #1c1c1d;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
    position: relative; /* Requis pour le Scrollspy de Bootstrap */
}

/* Ajoute une marge au-dessus des sections pour compenser la hauteur du menu fixe lors du scroll */
section[id] {
    scroll-margin-top: 100px;
}

h1, h2, h3, .navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.navbar {
    background-color: #0f111a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
}
.nav-link {
    color: var(--text-muted-white) !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.25s ease-in-out; /* Transition douce pour le changement d'état actif */
    position: relative;
}

.nav-link.active, .nav-link:hover {
    color: var(--brand-gold) !important;
}

.hero {
    background-image: url(/images/hero.png);
    background-size: cover;
    background-position: center;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    /*background: radial-gradient(circle at 80% 20%, rgba(255, 217, 0, 0.08) 0%, transparent 40%);*/
}

.btn-flat-primary {
    background-color: var(--brand-gold);
    color: #000;
    font-weight: 700;
    border: 1px solid var(--brand-gold);
    border-radius: 4px;
    padding: 12px 28px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}
.btn-flat-primary:hover {
    background-color: #cca95c;
    transform: translateY(-2px);
    color: #000;
}
.btn-flat-outline {
    background: transparent;
    color: #1c1c1d;
    border: 1px solid #d0d0d0;
    font-weight: 600;
    border-radius: 4px;
    padding: 12px 28px;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-flat-outline:hover {
    background: #f8f9fa;
    border-color: #a0a0a0;
    color: #1c1c1d;
}

.portfolio-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}
.portfolio-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-3px);
}
.portfolio-card:focus-visible {
    outline: 2px solid var(--brand-gold);
    outline-offset: 3px;
}

.portfolio-modal-content {
    background-color: #06070b;
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
}

#portfolioCarousel .carousel-item {
    background-color: #06070b;
}

#portfolioCarousel .carousel-item img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background-color: #06070b;
}

#portfolioCarousel .carousel-control-prev,
#portfolioCarousel .carousel-control-next {
    width: 8%;
}

#portfolioCarousel .carousel-indicators [data-bs-target] {
    background-color: var(--brand-gold);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
}

#portfolio {
    border-top: 1px solid rgba(255,255,255,0.02); 
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

#contact {
    background-color: #0b0c12; 
    border-top: 1px solid rgba(255,255,255,0.03); 
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.img-container {
    background-color: rgba(0, 0, 0, 0.2);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Container de la bannière collé en bas */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #1e293b; /* Bleu ardoise sombre très moderne */
    color: #f8fafc;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    z-index: 9999;
    font-family: sans-serif;
    border: 1px solid #334155;
    animation: slideUp 0.4s ease-out;
}

/* Boutons */
.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.cookie-buttons .btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

#btn-accept-all { background: #10b981; color: white; } /* Vert émeraude */
#btn-accept-all:hover { background: #059669; }

#btn-deny-all { background: #ef4444; color: white; } /* Rouge */
#btn-deny-all:hover { background: #dc2626; }

#btn-customize { background: #475569; color: white; } /* Gris ardoise */
#btn-customize:hover { background: #334155; }

/* La Modal de personnalisation */
#cookie-modal {
    margin-top: 15px;
    border-top: 1px solid #334155;
    padding-top: 15px;
}

#cookie-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #38bdf8;
    font-size: 1.25rem;
}

/* Liens d'action rapide (Tout cocher / Décocher) */
.cookie-quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
}

.btn-link-action {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-link-action:hover {
    color: #7dd3fc;
}

/* Ligne de service (Flexbox inversé pour mettre le switch à droite) */
#cookie-manager-form-container form div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    background: #1e293b;
}

/* Label & Description */
#cookie-manager-form-container label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    color: #f8fafc;
    cursor: pointer;
    max-width: 80%; /* Laisse de la place pour le switch à droite */
}

.service-desc {
    font-weight: normal;
    font-size: 0.8rem;
    color: #94a3b8; /* Gris ardoise clair */
    line-height: 1.3;
}

/* --- TRANSFORMATION EN SWITCH (iOS-like) --- */

/* On cache la checkbox par défaut mais on la garde accessible */
#cookie-manager-form-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background-color: #475569; /* Couleur éteinte */
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Évite que le switch ne se déforme */
    outline: none;
}

/* Le petit rond blanc à l'intérieur */
#cookie-manager-form-container input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* État actif (Coché) : Le fond devient bleu/vert et le rond glisse à droite */
#cookie-manager-form-container input[type="checkbox"]:checked {
    background-color: #10b981; /* Vert dynamique d'activation */
}

#cookie-manager-form-container input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

/* --- STYLISATION DES BOUTONS DU FORMULAIRE --- */

#cookie-manager-form-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#cookie-manager-form-container form > button:not([type="submit"]) {
    display: none; 
}

/* Style du bouton "Enregistrer" unique restant */
#cookie-manager-form-container button[type="submit"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: #38bdf8;
    color: #0f172a;
    transition: background-color 0.2s ease;
    font-family: sans-serif;
    font-size: 0.95rem;
    margin-top: 15px;
}

#cookie-manager-form-container button[type="submit"]:hover {
    background: #0ea5e9;
}

.btn-link {
    background: transparent;
    color: #94a3b8;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
}

#cookie-reopen-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 46px;
    height: 46px;
    background-color: #1e293b; /* Même bleu ardoise que la bannière */
    color: #38bdf8; /* Icône bleu ciel */
    border: 1px solid #334155;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9998; /* Juste en dessous de la bannière active */
    transition: transform 0.3s ease, background-color 0.2s ease;
}

#cookie-reopen-btn:hover {
    background-color: #334155;
    transform: scale(1.1) rotate(45deg); /* Petit effet de rotation de l'engrenage */
}

/* On s'assure que si la bannière est ouverte, l'engrenage reste discret */
#cookie-banner[style*="display: block"] ~ #cookie-reopen-btn {
    opacity: 0.5;
    pointer-events: none;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}