/*
══════════════════════════════════════════════════
🔵 Style.css — Page d'accueil index.html ❤️ 🧡 💛 💚 💙 💜 🤎 🖤 🤍
══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   0️⃣1️⃣ Sélecteur universel
   ══════════════════════════════════════════════════ */
* {
    box-sizing: border-box; /* Padding et bordure inclus dans width/height */
    margin: 0;              /* Supprime les marges par défaut du navigateur */
    padding: 0;             /* Supprime les espacements par défaut du navigateur */
}

/* ══════════════════════════════════════════════════
   0️⃣2️⃣ Corps de la page
   ══════════════════════════════════════════════════ */
body {
    font-family: 'Dancing Script', cursive;
    line-height: 1.5;
    background: #fefefe;
    color: #333;
}

/* ══════════════════════════════════════════════════
   0️⃣3️⃣ Bannière hero — fond plein écran
   ══════════════════════════════════════════════════ */
/* Note position CSS :
   relative = l'élément reste dans le flux, sert de repère pour ses enfants en absolute
   absolute = sort du flux, se positionne par rapport au premier parent en relative
   Coins : top/left (haut gauche) · top/right (haut droite)
           bottom/left (bas gauche) · bottom/right (bas droite) */
.hero-banner {
    position: relative; /* Repère pour les logos et le personnage */
    width: 100%;
    height: 100vh;      /* 100% de la hauteur de l'écran visible */
    overflow: hidden;   /* Cache tout contenu qui dépasse */
}

/* ══════════════════════════════════════════════════
   0️⃣4️⃣ Image de fond principale
   ══════════════════════════════════════════════════ */
.hero-image {
    position: absolute; /* Se place sur toute la surface du .hero-banner */
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Remplit sans étirer, recadre si nécessaire */
    display: block;     /* Supprime l'espace sous l'image (comportement inline par défaut) */
}

/* ══════════════════════════════════════════════════
   0️⃣5️⃣ Personnage mascotte — bas gauche
   ══════════════════════════════════════════════════ */
.personnage-tuto {
    position: absolute;
    bottom: 5px;
    left: 3px;
    height: 101px;
    width: auto;
    z-index: 10;
}

/* ══════════════════════════════════════════════════
   0️⃣6️⃣ Logo haut gauche — Chambre Syndicale de la Sophrologie
   ══════════════════════════════════════════════════ */
.logo-haut-gauche {
    position: absolute;
    top: 5px;
    left: 3px;
    height: 120px;
    width: auto;
    z-index: 10;
}

/* ══════════════════════════════════════════════════
   0️⃣7️⃣ Logo haut droite — AFVD
   ══════════════════════════════════════════════════ */
.logo-haut-droite {
    position: absolute;
    top: 5px;
    right: 3px;
    height: 120px;
    width: auto;
    z-index: 10;
}

/* ══════════════════════════════════════════════════
   0️⃣8️⃣ Logo bas droite — SFS
   ══════════════════════════════════════════════════ */
.logo-bas-droite {
    position: absolute;
    bottom: 5px;
    right: 3px;
    height: 160px;
    width: auto;
    z-index: 10;
}

/* ══════════════════════════════════════════════════
   0️⃣9️⃣ Conteneur des boutons de navigation
   ══════════════════════════════════════════════════ */
.hero-buttons {
    display: flex;
    position: absolute;
    top: 1%;    /* 1% depuis le haut du .hero-banner */
    right: 15%; /* 15% depuis la droite du .hero-banner */
}

/* ══════════════════════════════════════════════════
   1️⃣0️⃣ Barre de navigation — alignement des boutons
   ══════════════════════════════════════════════════ */
.hero-nav {
    display: flex;
    flex-wrap: nowrap; /* Tous les boutons restent sur une seule ligne */
    gap: 0.5vw;        /* Espace entre les boutons (0,5% de la largeur écran) */
}

/* ══════════════════════════════════════════════════
   1️⃣1️⃣ Style général des boutons
   ══════════════════════════════════════════════════ */
.btn {
    padding: 0.4em 1.2em;
    border-radius: 8px;
    border: none;
    cursor: pointer;          /* Curseur en forme de main au survol */
    font-size: 1rem;          /* 1rem = taille de base (~16px), respecte l'accessibilité */
    white-space: nowrap;      /* Empêche le texte de se couper sur plusieurs lignes */
    flex-shrink: 5;           /* Les boutons ne rétrécissent pas */
    transition: background 0.3s, transform 0.2s; /* Animation douce au survol */
}

/* Bouton principal */
.btn-primary {
    background-color: #4db6ac;
    color: #0c0c0c;
}

.btn-primary:hover {
    background-color: #268077;
}

/* Bouton secondaire */
.btn-secondary {
    background-color: #99f0eb;
    color: #333;
}

.btn-secondary:hover {
    background-color: #1eecf3;
}

/* ══════════════════════════════════════════════════
   🔧 BANNIÈRE MAINTENANCE / MODIFICATION / CONSTRUCTION
   ══════════════════════════════════════════════════ */

/* Recouvre tout l'écran */
.maintenance-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in;
}

.maintenance-banner-content {
    background: white;
    padding: 60px 80px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease-out;
}

.maintenance-banner-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.maintenance-banner-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.maintenance-banner-message {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.maintenance-banner-access-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.maintenance-banner-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* ══════════════════════════════════════════════════
   🔐 MODAL DE SAISIE DU CODE D'ACCÈS
   ══════════════════════════════════════════════════ */

.access-code-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease-in;
}

.access-code-modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.4s ease-out;
}

.access-code-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.access-code-modal-icon {
    font-size: 40px;
}

.access-code-modal-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.access-code-modal-message {
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

.access-code-input-container {
    position: relative;
    margin-bottom: 25px;
}

.access-code-input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    /* Masque l'icône œil native du navigateur (Edge, IE, Chrome) */
    -ms-reveal: none;
}

/* Masque l'icône œil native sur Chrome/Safari */
.access-code-input::-webkit-credentials-auto-fill-button,
.access-code-input::-webkit-contacts-auto-fill-button,
.access-code-input::-ms-reveal,
.access-code-input::-ms-clear {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.access-code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.access-code-toggle-visibility {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.access-code-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.access-code-modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.access-code-modal-btn-cancel {
    background: #e0e0e0;
    color: #666;
}

.access-code-modal-btn-cancel:hover {
    background: #d0d0d0;
}

.access-code-modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.access-code-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.access-code-error {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   ✅ TOAST DE SUCCÈS
   ══════════════════════════════════════════════════ */
.success-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    z-index: 10002;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s ease;
}

.success-toast-show {
    opacity: 1;
    transform: translateX(0);
}

/* ══════════════════════════════════════════════════
   🎬 ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* Animation de secousse — erreur de code */
.shake-animation {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100%              { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80%    { transform: translateX(10px); }
}

/* ══════════════════════════════════════════════════
   1️⃣2️⃣ Responsive — tablettes et mobiles
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero-nav {
        gap: 5px;
    }

    .btn {
        padding: 0.5em 0.9em;
        font-size: 0.9rem;
    }

    .maintenance-banner-content {
        padding: 40px 30px;
        max-width: 90%;
    }

    .maintenance-banner-title {
        font-size: 24px;
    }

    .maintenance-banner-message {
        font-size: 16px;
    }

    .access-code-modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.4em 0.7em;
        font-size: 0.85rem;
    }
}
