/**
 * MBCDI Rotation Control Styles
 * Styles pour le contrôle de rotation de carte
 * @version 5.5.1
 */

/* Contrôle de rotation */
.mbcdi-rotation-control {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.mbcdi-rotation-reset {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
    padding: 0;
}

.mbcdi-rotation-reset:hover {
    background: #f5f5f5;
    color: #007AFF;
}

.mbcdi-rotation-reset:active {
    background: #e8e8e8;
}

.mbcdi-rotation-reset svg {
    width: 20px;
    height: 20px;
}

/* Affichage de l'angle */
.mbcdi-rotation-angle {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    min-width: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Position du contrôle */
.leaflet-top.leaflet-right .mbcdi-rotation-control {
    margin-top: 10px;
    margin-right: 10px;
}

/* Responsive - mobile */
@media (max-width: 768px) {
    .mbcdi-rotation-control {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .mbcdi-rotation-reset {
        width: 48px;
        height: 48px;
    }

    .mbcdi-rotation-reset svg {
        width: 24px;
        height: 24px;
    }

    .mbcdi-rotation-angle {
        font-size: 14px;
        padding: 6px 10px;
    }

    .leaflet-top.leaflet-right .mbcdi-rotation-control {
        margin-top: 80px;
        margin-right: 16px;
    }
}

/* Animation lors de la rotation */
.leaflet-container.leaflet-rotating .leaflet-tile-pane {
    transition: transform 0.3s ease-out;
}

/* Support dark mode */
@media (prefers-color-scheme: dark) {
    .mbcdi-rotation-control {
        background: #2d2d2d;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .mbcdi-rotation-reset {
        background: #2d2d2d;
        color: #fff;
    }

    .mbcdi-rotation-reset:hover {
        background: #3a3a3a;
        color: #007AFF;
    }

    .mbcdi-rotation-reset:active {
        background: #444;
    }

    .mbcdi-rotation-angle {
        background: #1a1a1a;
        color: #ccc;
        border-top-color: #444;
    }
}
