/**
 * CSS Frontend pour les pages Ville Marée
 * Affichage des données dynamiques de marée
 */

/* Container des informations de marée du jour */
.tide-dynamic-info {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f2 100%);
    border-left: 5px solid #0073aa;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.tide-dynamic-info p {
    margin: 12px 0;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.tide-dynamic-info p:first-child {
    margin-top: 0;
}

.tide-dynamic-info p:last-child {
    margin-bottom: 0;
}

.tide-dynamic-info strong {
    color: #0073aa;
    font-weight: 600;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .tide-dynamic-info {
        padding: 15px 20px;
        margin: 20px 0;
    }
    
    .tide-dynamic-info p {
        font-size: 16px;
    }
}

/* Style pour les heures de marée */
.tide-dynamic-info .tide-time {
    background: rgba(0, 115, 170, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.1em;
}

/* Icônes optionnelles (si vous souhaitez ajouter des emoji) */
.tide-dynamic-info p:before {
    margin-right: 8px;
}

/* Style alternatif avec fond blanc */
.tide-dynamic-info.white-style {
    background: #ffffff;
    border: 2px solid #0073aa;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Archive Hiérarchique des Villes
   Utilise <details>/<summary> HTML5 natif (SEO-friendly)
   =========================================== */

.vmi-archive {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Stats Card */
.vmi-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.vmi-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vmi-stat-number {
    font-size: 1.75rem;
    font-weight: 500;
    color: #111827;
}

.vmi-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Locations Card */
.vmi-locations-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.vmi-locations-content {
    padding: 0.5rem 0;
}

/* Region (details) */
.vmi-region {
    border-bottom: 1px solid #f3f4f6;
}

.vmi-region:last-child {
    border-bottom: none;
}

/* Summary - Region toggle */
.vmi-region-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    list-style: none;
    outline: none;
}

.vmi-region-toggle::-webkit-details-marker {
    display: none;
}

.vmi-region-toggle::marker {
    display: none;
    content: "";
}


/* Chevron pour région */
.vmi-region-toggle::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.vmi-region[open] > .vmi-region-toggle::before {
    transform: rotate(90deg);
}

.vmi-region-name {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    flex: 1;
}

/* Badges */
.vmi-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.vmi-badge-region {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.vmi-badge-dept {
    background-color: #f3f4f6;
    color: #4b5563;
    min-width: 1.5rem;
    text-align: center;
}

.vmi-badge-available {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* Region Content */
.vmi-region-content {
    padding-left: 1.5rem;
    padding-bottom: 0.5rem;
}

/* Département (details) */
.vmi-departement {
    border-top: 1px solid #f3f4f6;
}

.vmi-departement:first-child {
    border-top: none;
}

/* Summary - Département toggle */
.vmi-dept-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    list-style: none;
    outline: none;
}

.vmi-dept-toggle::-webkit-details-marker {
    display: none;
}

.vmi-dept-toggle::marker {
    display: none;
    content: "";
}


/* Chevron pour département */
.vmi-dept-toggle::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.vmi-departement[open] > .vmi-dept-toggle::before {
    transform: rotate(90deg);
}

.vmi-dept-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

/* Liste des villes */
.vmi-villes-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem 1.5rem;
}

.vmi-villes-list li {
    margin: 0;
    padding: 0;
}

.vmi-ville-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    outline: none;
}


.vmi-ville-name {
    font-size: 0.875rem;
    color: #1f2937;
    flex: 1;
}

/* Note */
.vmi-note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1e40af;
}

.vmi-note strong {
    color: #1e3a8a;
}

/* Responsive */
@media (max-width: 640px) {
    .vmi-archive {
        padding: 1rem 0.75rem;
    }

    .vmi-stat-card {
        flex-direction: row;
        align-items: center;
        padding: 0.375rem 1rem;
        gap: 0.25rem;
    }

    .vmi-stat-number {
        font-size: 1rem;
    }

    .vmi-stat-label {
        font-size: 0.75rem;
    }

    .vmi-region-toggle {
        padding: 0.875rem 1rem;
    }

    .vmi-dept-toggle {
        padding: 0.625rem 0.75rem;
    }

    .vmi-region-content {
        padding-left: 1rem;
    }

    .vmi-villes-list {
        padding-left: 1rem;
    }

    .vmi-badge-region {
        font-size: 0.6875rem;
        padding: 0.125rem 0.5rem;
    }
}
