/* ========================================
   MINUTEUR PROFESSIONNEL - STYLES
   ======================================== */

/* Container principal style équipement professionnel */
.timer-main-container {
    background: #f8f9fa;
    background-image: 
        linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.08),
        0 4px 8px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.9);
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
}

/* Timer circulaire professionnel */
.circular-timer {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.08),
        inset 0 2px 4px rgba(0,0,0,0.04);
    padding: 20px;
    border: 2px solid #e9ecef;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 16;
}

.timer-progress {
    fill: none;
    stroke: #0066ff;
    stroke-width: 16;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

/* Affichage digital style LCD */
.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    font-weight: 300;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #212529;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.timer-label {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Inputs de temps style professionnel */
.time-inputs {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.time-input {
    width: 90px;
    padding: 1rem;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    color: #212529;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-family: 'SF Mono', monospace;
}

.time-input:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 
        0 0 0 3px rgba(0, 102, 255, 0.1),
        0 1px 3px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.time-input:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.time-input-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Presets professionnels */
.presets {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transition: left 0.5s;
}

.preset-btn:hover {
    background: #0066ff;
    color: white;
    border-color: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 255, 0.2);
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn:active {
    transform: translateY(0);
}

/* Contrôles principaux */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-timer {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-timer:hover::before {
    opacity: 1;
}

.btn-start {
    background: #28a745;
    color: white;
}

.btn-start:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-pause {
    background: #ffc107;
    color: #212529;
}

.btn-pause:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-stop {
    background: #dc3545;
    color: white;
}

.btn-stop:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-timer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.btn-timer:disabled::before {
    display: none;
}

/* Section Pomodoro professionnelle */
.pomodoro-section {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pomodoro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pomodoro-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Toggle switch professionnel */
.pomodoro-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: #dee2e6;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.pomodoro-toggle.active {
    background: #dc3545;
}

.pomodoro-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.2),
        0 0 0 1px rgba(0,0,0,0.05);
}

.pomodoro-toggle.active .pomodoro-toggle-slider {
    transform: translateX(28px);
}

/* Stats Pomodoro */
.pomodoro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.pomodoro-stat {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.pomodoro-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0066ff;
    font-family: 'SF Mono', monospace;
}

.pomodoro-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Notifications toast */
.notification {
    position: fixed;
    top: 5rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #28a745;
    color: white;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.1) inset;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    font-weight: 500;
    max-width: 320px;
}

.notification.show {
    transform: translateX(0);
}

/* Bouton son */
.sound-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.25rem;
}

.sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sound-toggle.muted {
    background: #f8f9fa;
    opacity: 0.7;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
}

.timer-finished {
    animation: pulse 1.5s ease-in-out infinite;
}

.timer-finished .timer-progress {
    stroke: #dc3545;
    filter: drop-shadow(0 0 8px rgba(220, 53, 69, 0.4));
}

/* ========================================
   MODE POMODORO - STYLES VISUELS
   ======================================== */

/* Mode Pomodoro - Styles visuels distinctifs */
.timer-main-container.pomodoro-active {
    background: linear-gradient(to bottom, #fff5f5 0%, #ffe0e0 100%);
    border-color: #dc3545;
}

.timer-main-container.pomodoro-active .circular-timer {
    box-shadow: 
        0 4px 12px rgba(220, 53, 69, 0.15),
        inset 0 2px 4px rgba(220, 53, 69, 0.05);
}

/* Couleur rouge tomate pour le mode Pomodoro */
.timer-main-container.pomodoro-active .timer-progress {
    stroke: #dc3545 !important;
    filter: drop-shadow(0 0 8px rgba(220, 53, 69, 0.3));
}

/* Phase de pause - couleur verte */
.timer-main-container.pomodoro-break .timer-progress {
    stroke: #28a745 !important;
    filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.3));
}

.timer-main-container.pomodoro-break {
    background: linear-gradient(to bottom, #f5fff5 0%, #e0ffe0 100%);
    border-color: #28a745;
}

/* Label plus visible en mode Pomodoro */
.timer-main-container.pomodoro-active .timer-label {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.timer-main-container.pomodoro-break .timer-label {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

/* Animation du toggle quand actif */
.pomodoro-toggle.active {
    animation: pulse-pomodoro 2s ease-in-out infinite;
}

@keyframes pulse-pomodoro {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* Stats Pomodoro plus visibles */
.pomodoro-stats {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-main-container.pomodoro-active .pomodoro-stat-value,
.timer-main-container.pomodoro-break .pomodoro-stat-value {
    color: #dc3545;
    font-size: 2.5rem;
}

/* ========================================
   SECTIONS DE CONTENU
   ======================================== */

/* Section contenu */
.content-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.content-section h2 {
    color: #212529;
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    text-align: center;
}

.content-section h3 {
    color: #212529;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.content-section p {
    color: #495057;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Hero section */
.hero-section {
    text-align: center;
    padding: 2rem 1rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #212529;
    margin-bottom: 0.5rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: #6c757d;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .timer-main-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .circular-timer {
        width: 240px;
        height: 240px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .time-input {
        width: 70px;
        font-size: 1.5rem;
        padding: 0.75rem;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 2rem;
    }
    
    .btn-timer {
        width: 100%;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .pomodoro-stats {
        grid-template-columns: 1fr;
    }
    
    .content-section h2 {
        font-size: 1.75rem;
    }
    
    .content-section h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .timer-main-container {
        padding: 1rem;
    }
    
    .circular-timer {
        width: 200px;
        height: 200px;
        padding: 15px;
    }
    
    .timer-display {
        font-size: 2rem;
        padding: 0.25rem 0.5rem;
    }
    
    .time-input {
        width: 60px;
        font-size: 1.25rem;
        padding: 0.5rem;
    }
    
    .presets {
        gap: 0.5rem;
    }
    
    .preset-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .pomodoro-section {
        padding: 1.5rem;
    }
    
    .sound-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ========================================
   MODE SOMBRE
   ======================================== */

@media (prefers-color-scheme: dark) {
    .timer-main-container {
        background: #1a1d21;
        border-color: #2d3238;
    }
    
    .circular-timer {
        background: #0d0f12;
        border-color: #2d3238;
    }
    
    .timer-display {
        background: rgba(13, 15, 18, 0.9);
        color: #e9ecef;
    }
    
    .timer-bg {
        stroke: #2d3238;
    }
    
    .time-input {
        background: #1a1d21;
        border-color: #2d3238;
        color: #e9ecef;
    }
    
    .time-input:focus {
        border-color: #0066ff;
        box-shadow: 
            0 0 0 3px rgba(0, 102, 255, 0.2),
            0 1px 3px rgba(0,0,0,0.3);
    }
    
    .preset-btn {
        background: #1a1d21;
        border-color: #2d3238;
        color: #adb5bd;
    }
    
    .preset-btn:hover {
        background: #0066ff;
        color: white;
    }
    
    .pomodoro-section {
        background: #1a1d21;
        border-color: #2d3238;
    }
    
    .pomodoro-stat {
        background: #0d0f12;
        border-color: #2d3238;
    }
    
    .sound-toggle {
        background: #1a1d21;
        border-color: #2d3238;
        color: #e9ecef;
    }
    
    /* Mode Pomodoro en dark mode */
    .timer-main-container.pomodoro-active {
        background: linear-gradient(to bottom, #2a1a1a 0%, #3a1a1a 100%);
        border-color: #dc3545;
    }
    
    .timer-main-container.pomodoro-break {
        background: linear-gradient(to bottom, #1a2a1a 0%, #1a3a1a 100%);
        border-color: #28a745;
    }
    
    .content-section h2,
    .content-section h3 {
        color: #e9ecef;
    }
    
    .content-section p {
        color: #adb5bd;
    }
}