/*
 * Thème CSS Moderne "Saphir & Charbon"
 * Inclut un fond subtilement animé pour un look contemporain
 */

/* --- Variables CSS pour une maintenance facile --- */
:root {
    --color-primary: #CDEDF6;       /* Bleu Saphir Profond (Accents) */
    --color-secondary: #5EB1BF;     /* Bleu Azur (Hover/Focus) */
    --color-text: #1f2937;          /* Noir Charbon (Texte Principal) */
    --color-background-soft: #f9fafb; /* Blanc Cassé Très Léger */
    --color-border: #e5e7eb;        /* Gris des bordures */

    --swim-primary: #98D2EB;   /* Bleu Ciel (Boutons, Actions) */
    --swim-light: #E1F2FE;     /* Eau Claire (Fonds, Sections) */
    --swim-muted: #B2B1CF;     /* Lavande Gris (Bordures, Textes secondaires) */
    --swim-dark: #273469;      /* Bleu Abysse (Titres, Nav, Textes importants) */
    --swim-success: #1A936F;   /* Vert Algue (Chronos, Validation, Succès) */
    --white: #FFFFFF;
}


/* --- Animation de fond --- */
@keyframes background-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes button-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); } /* Agrandit très légèrement le bouton */
    100% { transform: scale(1); }
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; /* Police moderne (suppose l'importation via HTML/Google Fonts) */
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 30px;

    /* Configuration du fond animé */
    background: linear-gradient(-45deg, #eab5e6, var(--color-background-soft), #e0f2f7, var(--color-background-soft));
    background-size: 300% 300%; /* Permet à l'animation d'avoir de l'espace pour se déplacer */
    animation: background-pan 10s ease infinite; /* 15 secondes, lent, fluide, infini */
    min-height: 100vh; /* Assure que le fond couvre toute la page */
}

/* --- Liens standards (non-boutons) --- */
a:not(.btn) {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:not(.btn):hover {
    color: var(--color-secondary);
    text-decoration: underline;
}


/* --- Titres H1 --- */
h1 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 800; /* Extra Gras */
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Ombre de texte légère pour un look plus "flat" et moderne */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- Titres H2 --- */
h2 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 800; /* Extra Gras */
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Ombre de texte légère pour un look plus "flat" et moderne */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- Conteneur de Formulaire (pour centrer et donner du relief) --- */
.form-container {
    max-width: 550px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px; /* Coins plus arrondis */
    /* Ombre portée douce (Soft Shadow) - clé du look moderne */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out;
}

.form-container:hover {
    transform: translateY(-2px); /* Léger effet de soulèvement au survol */
}

/* --- Éléments de Formulaire (Champs de texte et Listes déroulantes) --- */
input[type="text"],
select {
    width: 100%;
    padding: 12px 18px;
    margin: 10px 0;
    border: 1px solid var(--color-border);
    border-radius: 8px; /* Plus arrondis */
    box-sizing: border-box;
    color: var(--color-text);
    font-size: 16px;
    /* Transition pour l'effet de focus */
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Effet au focus */
input[type="text"]:focus,
select:focus {
    border-color: var(--color-secondary); /* Bleu Azur au focus */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); /* Anneau de focus élégant */
    outline: none;
}

/* --- Boutons de Validation --- */
button,
input[type="submit"] {
    background-color: var(--color-primary); /* Bleu Saphir */
    color: white;
    padding: 14px 25px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    /* Ombre subtile du bouton */
    box-shadow: 0 4px 15px rgba(0, 58, 138, 0.3);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

/* Effet au survol (hover) du bouton */
button:hover,
input[type="submit"]:hover {
    background-color: var(--color-secondary); /* Passe au Bleu Azur */
    transform: translateY(-1px); /* Léger soulèvement */
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Effet au clic (active) */
button:active,
input[type="button"]:active {
    transform: translateY(0);
}


button,
input[type="button"] {
    background-color: #ac4ac9; /* Bleu Saphir */
    color: white;
    padding: 14px 25px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    /* Ombre subtile du bouton */
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

/* Effet au survol (hover) du bouton */
button:hover,
input[type="button"]:hover {
    background-color: var(--color-secondary); /* Passe au Bleu Azur */
    transform: translateY(-1px); /* Léger soulèvement */
    box-shadow: 0 6px px rgba(59, 130, 246, 0.4);
}

.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;

    background-color: var(--color-primary);
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    /* Assure que la transformation (scale) ne provoque pas de saccade */
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    margin: 5px;
}

/* Effet de SOULEVEMENT et PULSATION au survol (hover) des liens-boutons */
.btn:hover {
    background-color: var(--color-secondary);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    /* Application de l'animation d'impulsion */
    animation: button-pulse 0.6s ease infinite;
}

/* Annulation de l'animation lors du clic pour un retour immédiat */
.btn:active {
    transform: scale(0.98);
    animation: none;
}

/* Variante : Bouton de lien sans fond (Outline) */
.btn.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}

.btn.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
    /* Conserve l'animation de pulsation */
    animation: button-pulse 0.6s ease infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.btn-outline:active {
    transform: scale(0.98);
    animation: none;
}



/* Conteneur relatif pour positionner la liste absolue */
.search-container {
    position: relative;
    width: 100%;
}

/* Liste des suggestions */
#suggestions {
    position: absolute;
    top: 100%; /* Juste en dessous de l'input */
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

/* Chaque ligne de suggestion */
#suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#suggestions li:hover {
    background-color: #f0f4f8;
    color: #1e3a8a;
}

/* Style de l'info résultat */
.info {
    margin-top: 10px;
    padding: 10px;
    background-color: #e0f2fe;
    border-left: 4px solid #3b82f6;
    color: #1e3a8a;
    font-size: 0.9em;
}

/* Conteneur de la carte pour positionner le spinner */
.map-container {
    position: relative;
    width: 100%;
    margin-top: 20px;
}

#map {
    height: 350px;
    width: 100%;
    border: 2px solid #1e3a8a;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Le Spinner */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 5px solid #1e3a8a;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    z-index: 1001; /* Doit être au-dessus de la carte */
}

@keyframes rotation {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Classe pour cacher le loader proprement */
.loader.hidden {
    display: none;
}
