/* Theme Name: crikoui 
Template: twentytwentyfive
Version: 0.1.0 
*/

/* ==========================================================================
   1. STYLES COMMUNS (Réservation, Contact et Téléversement)
   ========================================================================== */

.modern-contact-form {
    background: #f9f9f9;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 700px;
    margin: 2rem auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: inherit;
    color: #333;
}


/* Typographie commune */
.modern-contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Champs de saisie communs */
.modern-contact-form input:not([type="submit"]),
.modern-contact-form select,
.modern-contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #ffffff; 
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Focus harmonisé */
.modern-contact-form input:focus,
.modern-contact-form select:focus,
.modern-contact-form textarea:focus {
    border-color: var(--wp--preset--color--primary, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    outline: none;
}

/* Look unifié pour TOUS les boutons */
.modern-contact-form .wp-block-button__link {
    display: inline-block;
    border-radius: 30px !important; /* important pour forcer l’arrondi */
    padding: 0.8rem 2rem;           /* conserve ton padding */
    font-size: 1rem;                /* taille du texte */
    text-align: center;
}


#####

.upload-zone {
    width: 100%;
    max-width: 480px;
    margin: 2rem auto;
}

.upload-label {
    display: block;
    padding: 2.5rem 2rem;
    border: 2px dashed #ccc;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.upload-label:hover,
.upload-label:focus-within {
    border-color: var(--wp--preset--color--primary);
    background: #f4f8ff;
}

.upload-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--wp--preset--color--primary);
}

.upload-title {
    margin-bottom: .25rem;
}

.upload-subtitle {
    font-size: .9rem;
    color: #666;
}

.upload-file-name {
    display: block;
    margin-top: .75rem;
    font-size: .85rem;
    color: #555;
}

/* input natif caché mais accessible */
.upload-zone input[type="file"] {
    position: absolute;
    left: -9999px;
}


.button-text {
    display: inline-block;
    background: var(--wp--preset--color--primary, #007cba);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.file-name {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* Cache l'input natif */
#contrat_signe {
    display: none;
}

/* Messages de retour */
#televersement-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

#televersement-message.success {
    background: #e6ffed;
    color: green;
}

#televersement-message.error {
    background: #ffeef0;
    color: red;
}

/* Message d'erreur */
.error-message {
    text-align: center;
    padding: 2rem;
    color: red;
    background: #ffeef0;
    border-radius: 8px;
}

.success-message {
    text-align: center;
    padding: 2rem;
    color: green;
    background: #ffeef0;
    border-radius: 8px;
}

#####

.flatpickr-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.flatpickr-day.disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Style pour le wrapper du champ de date */
.date-input-wrapper {
    position: relative;
    width: 100%;
}

/* Style pour l'icône de calendrier */
.date-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #777;
}

/* Style pour le champ Flatpickr */
.flatpickr-input {
    padding: 8px 35px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Style pour les dates désactivées dans Flatpickr */
.flatpickr-day.disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}


.modern-contact-form .wp-block-button__link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ==========================================================================
   2. SPÉCIFICITÉS (Structure et Téléversement)
   ========================================================================== */

/* Grille pour Réservation et Contact */
.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-col {
    flex: 1;
    min-width: 200px;
}

/* Gestion spécifique du fichier (Contrat) */
.file-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.file-name {
    margin-left: 0.75rem;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast);
}

/* Messages de retour (AJAX) */
#televersement-message, .form-success, .form-error {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.form-success, #televersement-message.success { color: green; background: #e6ffed; }
.form-error, #televersement-message.error { color: red; background: #ffeef0; }

/* Responsive */
@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}

/* Centrage pour Réservation et Contact */
.form-button {
    text-align: center;
}

/* Centrage pour le formulaire de Contrat */
#televersement-form {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout le contenu du formulaire de contrat */
    gap: var(--wp--preset--spacing--40);
}
