/* ============================================================
   1. FOND DE PAGE ET TITRE
   ============================================================ */
html, body, #app, .baserow-application {
    background: radial-gradient(circle at center, #263d9e 0%, #16245e 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

.titre-apple-glow {
    /* 1. CENTRAGE ABSOLU ET PORTABILITÉ */
    display: block !important;
    width: 100% !important;         /* Prend toute la largeur disponible */
    text-align: center !important;  /* Centre le texte à l'intérieur */
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px 0 !important;     /* Aère le titre sans casser le centrage */

    /* 2. EFFET VISUEL (GRADIENT APPLE) */
    background: linear-gradient(180deg, #ffffff 30%, rgba(255,255,255,0.5) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    
    /* 3. TYPOGRAPHIE ET TAILLE ADAPTATIVE */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important; /* Look Apple plus moderne et serré */
    
    /* Taille intelligente : Minimum 1.8rem, idéal 6% de la largeur, Maximum 3.5rem */
    font-size: clamp(1.8rem, 6vw, 3.5rem) !important;
    
    /* 4. SÉCURITÉ */
    box-sizing: border-box !important;
    pointer-events: none !important; /* Évite que le titre bloque les clics autour */
}


/* ============================================================
   2. LE BLOC INTÉGRÉ (CHAMPS + BOUTON BLANC)
   ============================================================ */
/* ON TUE LE GRIS DU SURVOL SUR LE BLOC UNIQUEMENT */
.input-apple-glow:hover {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Les titres Courriel / MDP */
.input-apple-glow label, 
.input-apple-glow .ab-form-field__label {
    display: block !important;
    width: 280px !important;
    margin: 0 auto 8px auto !important;
    text-align: left !important;
    padding-left: 10px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* --- STYLE UNIFIÉ DES INPUTS ET BOUTONS VERRE --- */
.input-apple-glow input, 
.link-card-apple-glow {
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-radius: 14px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    
    /* Transition "Électrique" unifiée */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Les rectangles de saisie spécifiques */
.input-apple-glow input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 12px 15px !important;
    height: auto !important; /* Laisse le padding gérer la hauteur */
    margin-bottom: 10px !important;
    display: block !important; /* Pour que width: 100% dans label fonctionne */
}

/* ============================================================
   3. GESTION DES ERREURS (CENTRAGE)
   ============================================================ */
.input-apple-glow .ab-form-field__error, 
.input-apple-glow [class*="error"] {
    display: block !important;
    width: 280px !important;
    margin: 5px auto 15px auto !important;
    text-align: center !important;
    color: #ff4d4d !important; /* Rouge Apple vif */
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* ============================================================
   4. LE BOUTON S'IDENTIFIER (BLANC)
   ============================================================ */
.input-apple-glow button, 
.input-apple-glow .ab-button {
    background-color: white !important;
    color: #263d9e !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    height: 50px !important;
    width: 280px !important;
    margin: 20px auto 30px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Transition plus douce pour le bouton plein */
    transition: all 0.3s ease !important;
}

.input-apple-glow button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 25px rgba(0,0,0,0.3) !important;
}

/* ============================================================
   5. LES BOUTONS LIENS (S'INSCRIRE / OUBLIÉ)
   ============================================================ */
.link-card-apple-glow {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    min-height: 50px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

.link-card-apple-glow a {
    color: white !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
}

/* ============================================================
   6. INTERACTION HARMONISÉE : L'AURA ÉLECTRIQUE (GLOW ACCENTUÉ)
   ============================================================ */
/* Cible les inputs au focus (clic) ET les liens au survol */
.input-apple-glow input:focus, 
.link-card-apple-glow:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    
    /* L'AURA "ÉLECTRIQUE" DOUBLE : Diffuse + Intense */
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.45), 0 0 10px rgba(255, 255, 255, 0.2) !important;
    
    /* EFFET ORGANIQUE DE ZOOM */
    transform: scale(1.02); 
    outline: none !important;
}

/* Ajustement spécifique pour les liens au survol pour garantir le centrage du glow */
.link-card-apple-glow:hover {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================================
   7. TEXTE D'ANNONCE (STYLE GLASS EN BAS)
   ============================================================ */
.annonce-glow {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    margin: 40px auto !important;
    max-width: 650px !important;
    color: white !important;
    text-align: center !important;
}

/* ============================================================
   1. FOND GLOBAL (APPLICATION DU BLEU SUR TOUTE LA PAGE)
   ============================================================ */
/* On force le dégradé sur le fond de l'écran sans aucune coupure */
html, body {
    background: radial-gradient(circle at center, #263d9e 0%, #16245e 100%) !important;
    background-attachment: fixed !important;
    margin: 0 !important;
}

/* ON TUE LE BLANC : On rend tous les conteneurs de Baserow invisibles 
   pour laisser passer le bleu du fond. */
.baserow-application, 
.baserow-application__content, 
.view-application__panel,
.ab-page, 
.ab-content,
.ab-container {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ============================================================
   2. STYLE DU FORMULAIRE (MOT-CLÉ : form-apple-glow)
   ============================================================ */
.form-apple-glow {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Les Champs (Inputs) avec l'aura électrique */
.form-apple-glow input, 
.form-apple-glow select, 
.form-apple-glow textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 14px !important;
    color: white !important;
    padding: 12px 15px !important;
    width: 100% !important; 
    margin-bottom: 15px !important;
    display: block !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* L'EFFET ÉLECTRIQUE AU CLIC */
.form-apple-glow input:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.45), 0 0 10px rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
    transform: scale(1.01);
}

/* Titres des champs */
.form-apple-glow label {
    display: block !important;
    text-align: left !important;
    padding-left: 10px !important;
    margin-bottom: 5px !important;
    color: white !important;
    font-weight: 600 !important;
}

/* ============================================================
   3. BOUTON VALIDER (BLANC ET CENTRÉ)
   ============================================================ */
.form-apple-glow button, 
.form-apple-glow .ab-button {
    background-color: white !important;
    color: #263d9e !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    height: 50px !important;
    width: 280px !important; /* Largeur fixe élégante */
    border: none !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    
    /* LE CENTRAGE */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 30px auto !important; 
    
    transition: all 0.3s ease !important;
}

.form-apple-glow button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 25px rgba(0,0,0,0.3) !important;
}

/* ============================================================
   1. LA GRILLE (STABLE)
   ============================================================ */
.home-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
    padding: 40px 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* ============================================================
   2. LA CARTE (DEVIENT LE "MOTEUR" DE L'ANIMATION)
   ============================================================ */
.home-card {
    /* On enlève tout le style visuel ici pour le mettre sur le bouton */
    background: transparent !important;
    border: none !important;
    padding: 0 !important; /* CRUCIAL : Le bouton doit toucher les bords */
    
    width: 320px !important;
    height: 180px !important;
    
    display: flex !important;
    cursor: pointer !important;
    
    /* Animation fluide et stable */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform; /* Prévient le navigateur pour une animation fluide */
}

/* LE SOULÈVEMENT STABILISÉ */
.home-card:hover {
    transform: translateY(-12px) !important;
}

/* ============================================================
   3. LE BOUTON (LA SURFACE BLANCHE TOTALE)
   ============================================================ */
.home-card button, .home-card .ab-button, .home-card .ab-link {
    /* REMPLISSAGE TOTAL DE LA SURFACE */
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    
    /* STYLE VISUEL "APPLE" */
    background: white !important;
    color: #263d9e !important;
    border: none !important;
    border-radius: 28px !important; /* Arrondi généreux style iOS */
    
    /* TYPOGRAPHIE */
    font-weight: 800 !important;
    font-size: 1.4rem !important;
    text-transform: uppercase !important;
    text-align: center !important;
    text-decoration: none !important;

    /* CENTRAGE DU TEXTE */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;

    /* OMBRE PORTÉE ÉLÉGANTE */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.4s ease !important;
}

/* Effet de brillance quand la plaque se soulève */
.home-card:hover button, 
.home-card:hover .ab-button, 
.home-card:hover .ab-link {
    background: #ffffff !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3) !important;
    /* On ajoute une légère bordure pour la définition */
    outline: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* ============================================================
   4. ADAPTATION MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .home-card {
        width: 100% !important;
        max-width: 380px !important;
        height: 120px !important; /* Plus fin sur mobile */
    }
}