/* --- 1. Base et centrage infaillible --- */
:root {
    --multiplicateur-taille: 1; /* Taille normale par défaut */
}

body {
    margin: 0;
    padding: 0;
    background-color: #f3f4f6;
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* C'est cette ligne qui va tout piloter : */
    transform: scale(var(--multiplicateur-taille));
    transform-origin: center center;
}


.page-reglages-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: apparitionDouce 0.5s ease-out;
}

@keyframes apparitionDouce {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 2. Le bouton retour --- */
.bouton-retour {
    position: fixed;
    top: 30px;
    left: 30px;
    text-decoration: none;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    z-index: 100;
}

.bouton-retour:hover {
    color: #374151;
    background-color: #e5e7eb;
    transform: translateX(-5px);
}

/* --- 3. La carte des réglages --- */
.carte-reglages {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.titre-reglages {
    color: #1f2937;
    margin: 0 0 15px 0;
    font-size: 1.375rem;
    text-align: center;
}

.separateur-doux {
    border: 0;
    height: 1px;
    background-color: #f3f4f6;
    margin: 20px 0;
}

/* --- 4. Lignes de réglages --- */
.section-reglage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.reglage-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #374151;
}

.reglage-info p {
    margin: 0;
    font-size: 0.9em;
    color: #9ca3af;
}

/* --- 5. Le design des interrupteurs (Toggles) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: #284196; /* Le bleu doux de Sanarca quand c'est activé */
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* --- 6. Bouton Déconnexion --- */
.btn-annuler {
    font-family: 'Quicksand', sans-serif;
    background-color: transparent;
    color: #ef4444; /* Rouge doux pour indiquer une action de sortie */
    border: 1px solid #fee2e2;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-annuler:hover {
    background-color: #fef2f2;
}

/* Style des sous-titres de catégories */
.sous-titre-section {
    font-size: 0.875rem;
    color: #284196; /* Le bleu Sanarca */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
}

/* Style des petits menus déroulants */
.menu-choix {
    font-family: 'Quicksand', sans-serif;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.menu-choix:focus {
    border-color: #0ea5e9;
}

html.texte-grand {
    --multiplicateur-taille: 0.85rem
    ; /* +10% partout */
}

html.texte-tres-grand {
    --multiplicateur-taille: 1.25rem; /* +20% partout */
}


/* --- Le bouton Enregistrer --- */
.btn-enregistrer {
    font-family: 'Quicksand', sans-serif;
    background-color: #284196; /* Le bleu Sanarca */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px; /* Crée un petit espace avec le bouton de déconnexion en dessous */
}

.btn-enregistrer:hover {
    background-color: #0284c7; /* Un bleu légèrement plus foncé au survol */
    transform: translateY(-2px); /* Petit effet de soulèvement */
}

/* Quand cette classe est ajoutée au body, les éléments sensibles deviennent illisibles */
body.mode-prive .zone-sensible {
    filter: blur(10px);
    pointer-events: none; /* Empêche de cliquer sur ce qui est flou */
    user-select: none;    /* Empêche de copier le texte flou */
    transition: filter 0.3s ease;
}

/* --- ADAPTATION MOBILE (Écrans < 768px) --- */
@media (max-width: 768px) {
    .bouton-retour {
        top: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .carte-profil, .carte-reglages {
        width: 90%;
        padding: 20px;
    }
}