/* Style spécifique Soirée des Parents - Inspiré de GPAS & Échange d'Heures */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

:root {
    --sp-primary: #2c3e50;
    --sp-secondary: #34495e;
    --sp-blue: #3498db;
    --sp-blue-hover: #2980b9;
    --sp-green: #27ae60;
    --sp-green-light: #ecfdf5;
    --sp-green-border: #a7f3d0;
    --sp-red: #e74c3c;
    --sp-red-light: #fef2f2;
    --sp-red-border: #fca5a5;
    --sp-orange: #f39c12;
    
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Alignement & En-têtes type GPAS / Échange d'heures */
.sp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sp-page-title {
    color: var(--sp-primary);
    border-left: 5px solid var(--sp-blue);
    padding-left: 15px;
    font-size: 1.65rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.sp-page-subtitle {
    color: #64748b;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1rem;
    padding-left: 20px;
}

/* Cartes (Card Custom) */
.card-custom {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: var(--hover-shadow);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--sp-primary);
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hero Banner / En-tête de bienvenue */
.sp-hero-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sp-hero-banner h2 {
    color: #ffffff !important;
    margin: 0 0 6px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.sp-hero-banner p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* Grille des créneaux horaires */
.sp-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.sp-slot-tile {
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.sp-slot-time {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

/* États des créneaux */
.sp-slot-available {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.sp-slot-available:hover {
    background-color: #d1fae5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(4, 120, 87, 0.12);
}

.sp-slot-mine {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.1);
}

.sp-slot-occupied {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
    opacity: 0.85;
}

.sp-slot-blocked {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    opacity: 0.85;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-available { background-color: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-mine { background-color: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-occupied { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-blocked { background-color: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Légende des états */
.sp-legend-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.sp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.sp-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Boutons de type GPAS / Échange d'heures */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: normal;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: #3498db;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.25);
}

.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.35);
}

.btn-pastel-blue {
    background: #e0f2fe;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
}

.btn-pastel-blue:hover {
    background: #bae6fd;
    color: #0284c7 !important;
}

.btn-success {
    background: #27ae60;
    color: #ffffff !important;
}

.btn-success:hover {
    background: #219653;
}

.btn-danger {
    background: #e74c3c;
    color: #ffffff !important;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-outline {
    background: #ffffff;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Bouton icône corbeille discret */
.btn-icon-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #ef4444;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.btn-icon-danger:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Formulaires & Input */
label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #2c3e50;
    display: block;
}

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    background-color: #fff;
    color: #334155;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Alertes */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modale interactive */
.sp-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.sp-modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    margin: 15px;
    box-sizing: border-box;
}

.sp-modal-header {
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.sp-modal-header h3 {
    margin: 0;
    color: var(--sp-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Alert warning */
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Badges de statut */
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 9999px;
}
.sp-badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.sp-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.sp-badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Phase Toggle Switches */
.phase-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.phase-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.phase-info {
    flex: 1;
    margin-right: 20px;
}
.phase-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.phase-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Switch UI */
.sp-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}
.sp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}
.sp-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sp-switch input:checked + .sp-slider {
    background-color: #10b981;
}
.sp-switch input:focus + .sp-slider {
    box-shadow: 0 0 1px #10b981;
}
.sp-switch input:checked + .sp-slider:before {
    transform: translateX(24px);
}

