/* ==========================================================================
   TOCCA A TE — Page d'inscription
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- ANIMATION FLOTTAISON --- */
.anim-float {
    opacity: 0;
    transform: translateY(20px);
    animation: floatIn 0.8s ease-out forwards;
}
@keyframes floatIn {
    to { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* --- VIDEO EN ARRIERE-PLAN DE TOUTE LA PAGE --- */
.page-video-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -20;
}

/* --- CARTES "VERRE FONCE" : teintée noir pour contraste sur vidéo claire --- */
.glass-card {
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
  transition: all 0.3s ease;
}

/* Effet au survol (Hover) avec halo lumineux jaune/doré */
.glass-card:hover,
.pedago-card:hover {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid #ffffff;
  /* Halo lumineux intense façon 'brand-yellow' */
  box-shadow: 0 0 25px rgba(254, 202, 60, 0.6), 0 8px 20px rgba(254, 202, 60, 0.4);
  transform: translateY(-4px) scale(1.03);
}

/* Effet au clic (Active) */
.glass-card:active,
.pedago-card:active {
  transform: scale(0.97) rotateZ(1deg);
}



/* --- TITRES DE SECTION : soulignement "tricolore" ---
   Signature visuelle : un dégradé rouge / blanc / vert, discret clin d'œil
   au drapeau italien, cohérent avec le nom de l'école et sa palette existante. */
.section-title-center {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}
.section-title-center::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    height: 4px;
    background: linear-gradient(90deg,
        #f85a3e 0%, #f85a3e 30%,
        #ffffff 30%, #ffffff 70%,
        #007E3A 70%, #007E3A 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments for section titles */
@media (max-width: 480px) {
    .section-title-center::after {
        width: 60px;
    }
}

/* --- TEXTES HORS CARTE : ombres renforcées pour vidéo claire --- */
.hero-strong-shadow {
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 4px 16px rgba(0, 0, 0, 0.7),
        0 8px 40px rgba(0, 0, 0, 0.5);
}
.title-strong-shadow {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 3px 12px rgba(0, 0, 0, 0.7),
        0 6px 30px rgba(0, 0, 0, 0.4);
}
.label-strong-shadow {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 3px 10px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   INPUTS VERRE — adaptés au glass-card sombre
   ========================================================================== */
.input-glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
    padding: 12px 16px;
    font-size: 1rem;
}
.input-glass:focus {
    outline: none;
    border-color: rgba(254, 202, 60, 0.6);
    box-shadow: 0 0 0 3px rgba(254, 202, 60, 0.15);
    background: rgba(255, 255, 255, 0.09);
}
.input-glass::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
.input-glass option {
    background: #1a1a1a;
    color: #fff;
    padding: 8px;
}
.input-glass[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}
.input-glass:-webkit-autofill,
.input-glass:-webkit-autofill:hover,
.input-glass:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.6) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Responsive improvements for form inputs */
@media (max-width: 480px) {
    .input-glass {
        padding: 14px 16px;
        font-size: 1.1rem;
    }

    .btn-parcourir {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 12px;
    }
}

/* ==========================================================================
   MODALE RECHERCHE LIEU DE NAISSANCE
   ========================================================================== */
.btn-parcourir {
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-parcourir:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lieu-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lieu-modal-overlay.hidden {
    display: none;
}

.lieu-modal {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    margin: 0 auto;
}

/* Responsive improvements for modal */
@media (max-width: 480px) {
    .lieu-modal {
        padding: 20px;
        max-width: 90%;
        max-height: 85vh;
    }

    .lieu-modal-overlay {
        padding: 10px;
    }

    .btn-parcourir {
        padding: 16px 24px;
        font-size: 1.05rem;
        width: 100%;
    }

    .lieu-selected-country,
    .lieu-change-country {
        font-size: 1rem;
        padding: 10px 16px;
    }
       .lieu-suggestions {
           max-height: 180px; /* Reduced height for suggestions in mobile */
       }
}

.lieu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.lieu-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.lieu-modal-close:hover {
    color: #fff;
}

.lieu-modal-step.hidden {
    display: none;
}

.lieu-suggestions {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 12px;
}

.lieu-suggestions li {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.lieu-suggestions li:hover,
.lieu-suggestions li.active {
    background: rgba(254, 202, 60, 0.15);
    color: #feca3c;
}

.lieu-suggestions li.empty {
    color: rgba(255, 255, 255, 0.35);
    cursor: default;
}

.lieu-suggestions li.empty:hover {
    background: none;
}

.lieu-selected-country {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 14px;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
}

.lieu-change-country {
    background: none;
    border: none;
    color: #feca3c;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ==========================================================================
   SELECTEUR DE PARCOURS — cartes façon "sélection de personnage"
   ========================================================================== */
.option-card {
    position: relative;
    display: block;
    width: 100%;
    background: rgba(10, 10, 10, 0.40);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.option-card:hover {
    transform: translateY(-4px);
    border-color: rgba(254, 202, 60, 0.5);
}
.option-card.is-selected {
    border-color: #feca3c;
    box-shadow: 0 0 0 4px rgba(254, 202, 60, 0.25), 0 12px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-4px) scale(1.02);
}
.option-card.is-dimmed {
    opacity: 0.55;
}
.option-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #feca3c;
    color: #151515;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s ease;
}
.option-card.is-selected .option-check {
    opacity: 1;
    transform: scale(1);
}

/* Responsive improvements for option cards */
@media (max-width: 480px) {
    .option-card {
        border-radius: 18px;
        border-width: 3px;
    }

    .option-card h3 {
        font-size: 1.25rem;
    }

    .option-card p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .option-check {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        top: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   GUIDE D'INSCRIPTION — présentation "livre" avec effet de page qui se
   tourne. Affiché entre le sélecteur de parcours et le formulaire.
   Structure : .book-stage contient la page 2 (statique, dessous) et
   .book-flip (page 1, pivote à -180° autour de sa reliure gauche pour
   révéler la page 2).
   ========================================================================== */
 .book-stage {
            position: relative;
            min-height: 440px; /* Hauteur ajustée pour le contenu */
            perspective: 1800px; /* Perspective plus profonde pour plus de réalisme */
        }

        /* Simulation de la reliure (Spine) sur le côté gauche */
        .book-stage::before {
            content: "";
            position: absolute;
            left: 0;
            top: 10px;
            bottom: 10px;
            width: 20px;
            background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 80%);
            border-radius: 4px 0 0 4px;
            z-index: 0; /* Derrière les pages */
            pointer-events: none;
        }

        /* --- PAGES ET ANIMATION --- */
        .book-face {
            position: absolute;
            inset: 0;
            border-radius: 4px 12px 12px 4px; /* Coins moins arrondis pour un effet livre plus carré */
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            transform-style: preserve-3d;
        }

        /* Élément qui tourne */
        .book-flip {
            position: absolute;
            inset: 0;
            transform-style: preserve-3d;
            transform-origin: left center; /* La charnière est à gauche */
            transition: transform 1.1s cubic-bezier(0.645, 0.045, 0.355, 1); /* Courbe fluide et naturelle */
            z-index: 20;
        }

        /* État "tourné" */
        .book-flip.is-flipped {
            transform: rotateY(-180deg);
        }

        /* Face avant (Page 1) */
        .book-face-front {
            z-index: 2;
        }

        /* Face arrière (Dos de la Page 1) */
        .book-face-back {
            transform: rotateY(180deg);
            /* C'est le dos de la feuille, donc blanc aussi */
            background: #fdfdfd;
        }

        /* --- STYLE DES PAGES (Effet Papier Blanc Réaliste) --- */
        .book-page-content {
            background: #ffffff;
            /* L'astuce pour le réalisme : un dégradé léger sur la gauche pour simuler la courbure près de la reliure */
            background-image: linear-gradient(to right, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.02) 8%, transparent 20%);
            color: #1a1a1a;
            padding: 2rem 2rem 1.5rem 2.5rem; /* Plus de padding à gauche pour la reliure */
            display: flex;
            flex-direction: column;

            /* Ombre douce pour donner du volume à la feuille individuelle */
            box-shadow:
                inset 2px 0 5px rgba(0,0,0,0.05), /* Ombre interne reliure */
                0 2px 4px rgba(0,0,0,0.05), /* Ombre portée légère */
                0 10px 20px rgba(0,0,0,0.08); /* Ombre profonde */

            border: 1px solid #e5e5e5;
            border-left: none; /* Pas de bordure gauche car c'est relié */
        }

        /* Style spécifique pour la Page 2 (Statique en dessous) */
        #bookPage2.book-page-content {
            z-index: 1; /* En dessous de la page qui tourne */
            /* Ombre plus marquée car c'est la "base" */
            box-shadow: 0 4px 8px rgba(0,0,0,0.1), inset 2px 0 5px rgba(0,0,0,0.05);
            /* Texture légèrement différente pour distinguer les feuilles */
            background-image: linear-gradient(to right, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.03) 10%, transparent 25%);
        }

        /* --- CONTENU DES PAGES --- */
        .book-page-index {
            align-self: flex-end;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: #999;
            margin-bottom: 1rem;
            font-family: 'Inter', sans-serif;
        }

        .book-page-heading {
            font-family: 'Anton', sans-serif;
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: #111;
            line-height: 1.1;
            text-transform: uppercase;
            border-bottom: 2px solid #feca3c; /* Touche de couleur */
            display: inline-block;
            padding-bottom: 4px;
        }

        .book-list {
            list-style: none;
            margin: 0 0 1.5rem;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            flex: 1;
        }

        .book-list li {
            position: relative;
            padding-left: 1.5rem;
            font-size: 0.9rem;
            line-height: 1.5;
            color: #444;
        }

        /* Puces personnalisées */
        .book-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 6px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #f85a3e; /* Orange */
            box-shadow: 0 0 0 2px rgba(248, 90, 62, 0.2);
        }

        .book-list li:nth-child(even)::before {
            background: #007E3A; /* Vert */
            box-shadow: 0 0 0 2px rgba(0, 126, 58, 0.2);
        }

        .book-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: auto;
            padding-top: 1rem;
            border-top: 1px dashed #eee;
        }

        /* --- BOUTONS --- */
        .book-btn {
            font-weight: 700;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-radius: 6px;
            padding: 0.75rem 1.25rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            font-family: 'Inter', sans-serif;
        }

        .book-btn-primary {
            background: #1a1a1a; /* Bouton noir élégant sur papier blanc */
            color: #fff;
        }

        .book-btn-primary:hover {
            background: #333;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .book-btn-ghost {
            background: transparent;
            color: #666;
            border: 1px solid #ddd;
        }

        .book-btn-ghost:hover {
            border-color: #999;
            color: #111;
        }

        /* --- Détail réaliste : Coin de page corné (Dog-ear) --- */
        .book-face-front::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 0;
            height: 0;
            border-style: solid;
            border-width: 0 0 20px 20px;
            border-color: transparent transparent #eee transparent; /* Ombre du coin */
            transition: border-width 0.3s ease;
            pointer-events: none;
        }

        /* Légère interaction au survol de la page */
        .book-flip:hover .book-face-front::after {
            border-width: 0 0 30px 30px; /* Le coin semble se soulever */
        }

        /* Responsive improvements for book flip section */
        @media (max-width: 480px) {
            .book-stage {
                min-height: 300px;
                perspective: 1200px;
            }

            .book-page-content {
                padding: 1.5rem 1.5rem 1rem 2rem;
            }

            .book-page-heading {
                font-size: 1.25rem;
                margin-bottom: 1rem;
            }

            .book-list li {
                font-size: 0.85rem;
                line-height: 1.4;
                padding-left: 1.25rem;
            }

            .book-list li::before,
            .book-list li:nth-child(even)::before {
                width: 6px;
                height: 6px;
                top: 4px;
            }

            .book-actions {
                flex-direction: column;
                gap: 1rem;
                align-items: stretch;
            }

            .book-btn {
                font-size: 0.85rem;
                padding: 0.85rem 1.25rem;
                width: 100%;
                text-align: center;
            }
        }

/* ==========================================================================
   CARTE "NOS LOCAUX" — Leaflet habillé aux couleurs de la marque
   ========================================================================== */
.map-glass {
    width: 100%;
    height: 200px;               /* un peu plus haut pour voir la fiche du lieu */
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.map-glass iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
@media (min-width: 768px) {
    .map-glass { height: 100%; min-height: 200px; }
}


.page-footer {
    margin: 0 20px 24px;
    text-align: center;
    padding: 20px;
}
.page-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}


