/* ===================================
   STYLES SPÉCIFIQUES AUX PAGES
   Fichier créé pour centraliser les styles qui étaient dans les balises <style> des PHP
   =================================== */

/* Smooth scroll pour toute la page */
html {
    scroll-behavior: smooth;
}

/* ===================================
   ACCOUNT.PHP - Page Mon Compte
   =================================== */
.account-background {
    min-height: 100vh;
    padding: 80px 0;
    background-image: url('../images/hero_1.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.account-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.account-background > .container {
    position: relative;
    z-index: 1;
}

/* Tables hover pour account */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* ===================================
   RESULT.PHP - Page Résultat Tirage
   =================================== */
.result-page {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 50%, #b71c1c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    padding: 20px;
}

.success-container {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #000000;
    border-radius: 15px;
    padding: 60px 40px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.success-container h1 {
    color: #000000;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.success-container p {
    color: #333;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.success-container .countdown {
    font-size: 48px;
    font-weight: 700;
    color: #c62828;
    margin: 30px 0;
}

.success-container .info-box {
    background: #000000;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.success-container .info-box p {
    margin: 0;
    color: #fff;
}

/* ===================================
   DRAWS.PHP - Page Création Tirage
   =================================== */
.participant-row {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.participant-row:hover {
    background: #e9ecef;
}

.remove-participant {
    background: none !important;
    color: inherit;
    border: none;
    padding: 0;
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.remove-participant:hover {
    transform: scale(1.1);
    opacity: 0.7;
    text-decoration: none;
}

.exclusion-badge {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.exclusion-badge .remove-exclusion {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

.exclusion-badge .remove-exclusion:hover {
    color: #ff6b6b;
}

/* ===================================
   INDEX.PHP - Page d'accueil
   =================================== */
.home-hero {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
    padding: 100px 0 80px 0;
    position: relative;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/snow-pattern.png') repeat;
    opacity: 0.1;
}

/* Force le centrage du contenu de la page d'accueil */
.hero .intro-wrap {
    text-align: center !important;
}

.hero .intro-wrap h1 {
    text-align: center !important;
}

.hero .intro-wrap .form {
    margin: 0 auto;
    text-align: left;
}

.hero .intro-wrap #registrationForm {
    text-align: left;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    height: 100%;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: #c62828;
    box-shadow: 0 10px 30px rgba(198, 40, 40, 0.2);
}

.feature-card .icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    color: #000;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ===================================
   FORGETPASSWORD.PHP / RESET_PASSWORD.PHP
   =================================== */
.password-reset-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.password-reset-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ===================================
   ANIMATIONS GLOBALES
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    /* Fix hero spacing on mobile - navbar is absolute */
    .hero {
        padding-top: 100px !important;
    }
    
    .account-background {
        padding: 40px 0;
    }
    
    .success-container {
        padding: 40px 20px;
    }
    
    .success-container h1 {
        font-size: 24px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .success-container .countdown {
        font-size: 36px;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    .participant-row {
        padding: 10px;
    }
    
    /* CREATE-DRAW.PHP - Responsive form */
    .form {
        padding: 20px !important;
    }
    
    .form-section {
        padding: 20px !important;
    }
    
    .form-section h3 {
        font-size: 20px !important;
    }
    
    .participant-row {
        padding: 15px !important;
    }
    
    .participant-row label {
        font-size: 11px !important;
    }
    
    .participant-row .form-control {
        padding: 8px !important;
        font-size: 14px !important;
    }
    
    /* INDEX.PHP - Responsive hero */
    .hero h1 {
        font-size: 42px !important;
    }
    
    .hero p {
        font-size: 18px !important;
    }
    
    .hero .btn {
        font-size: 16px !important;
        padding: 14px 30px !important;
    }
}

@media (max-width: 576px) {
    /* Fix hero spacing on small mobile */
    .hero {
        padding-top: 90px !important;
    }
    
    .success-container {
        padding: 30px 15px;
    }
    
    .success-container h1 {
        font-size: 20px;
    }
    
    .success-container p {
        font-size: 16px;
    }
    
    /* CREATE-DRAW.PHP - Small mobile adjustments */
    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 20px !important;
    }
    
    /* INDEX.PHP - Small mobile */
    .intro-wrap h1 {
        font-size: 32px !important;
    }
    
    .intro-wrap p {
        font-size: 16px !important;
    }
    
    .hero .btn {
        font-size: 15px !important;
        padding: 12px 25px !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .d-flex {
        flex-direction: column !important;
    }
    
    .form {
        padding: 15px !important;
    }
    
    .form-section {
        padding: 15px !important;
    }
    
    .form-section h3 {
        font-size: 18px !important;
    }
    
    .participant-row {
        padding: 12px !important;
    }
    
    .btn {
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    input[type="submit"] {
        font-size: 16px !important;
        padding: 14px !important;
    }
}

/* =========================================
   Mobile Menu Fixes (merged from mobile-fix.css)
   ========================================= */

.burger {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 9999;
  position: relative;
}

.site-menu-toggle {
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-mobile-menu {
  z-index: 9998;
  -webkit-overflow-scrolling: touch;
}

body.offcanvas-menu {
  overflow: hidden;
  position: relative;
}

body.offcanvas-menu .site-mobile-menu {
  visibility: visible;
  opacity: 1;
}

* {
  touch-action: manipulation;
}

@media (hover: none) and (pointer: coarse) {
  .site-menu-toggle {
    padding: 15px;
  }
  .burger {
    pointer-events: auto;
  }
}

/* =========================================
   Bannière cookies (CNIL)
   ========================================= */

#cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

#cookie-overlay.cb-overlay-visible {
    opacity: 1;
    pointer-events: all;
}

body.cb-blocked {
    overflow: hidden;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1a1a1a;
    color: #f0f0f0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(.22,.68,0,1.2), opacity 0.35s ease;
    font-size: 14px;
}

#cookie-banner.cb-visible {
    transform: translateY(0);
    opacity: 1;
}

.cb-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cb-text {
    flex: 1;
    min-width: 260px;
}

.cb-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
    color: #fff;
}

.cb-text p {
    margin: 0 0 4px;
    line-height: 1.5;
    color: #ccc;
    font-size: 13px;
}

.cb-link {
    font-size: 12px;
    color: #aaa;
    text-decoration: underline;
}

.cb-link:hover {
    color: #fff;
}

.cb-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cb-btn {
    padding: 9px 22px;
    border-radius: 6px;
    border: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.cb-btn-refuse {
    background: transparent;
    border-color: #666;
    color: #ccc;
}

.cb-btn-refuse:hover {
    border-color: #aaa;
    color: #fff;
}

.cb-btn-accept {
    background: #2c7a37;
    border-color: #2c7a37;
    color: #fff;
}

.cb-btn-accept:hover {
    background: #23602c;
    border-color: #23602c;
}

@media (max-width: 575px) {
    .cb-inner {
        flex-direction: column;
        gap: 14px;
    }
    .cb-actions {
        width: 100%;
        justify-content: stretch;
    }
    .cb-btn {
        flex: 1;
        text-align: center;
    }
}

/* =========================================
   Tips Carousel
   ========================================= */

.tips-carousel {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 20px 24px 14px;
    min-height: 80px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tips-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.tips-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.tips-text {
    color: #333;
    font-size: 0.97rem;
    line-height: 1.5;
    flex: 1;
    min-height: 2.5em;
    transition: none;
}

.tips-text.tips-exit {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.tips-text.tips-enter {
    opacity: 0;
    transform: translateY(6px);
    animation: tipsEnter 0.35s ease forwards;
}

@keyframes tipsEnter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tips-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.tips-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
    outline: none;
}

.tips-dot.active {
    background: #2c7a37;
    transform: scale(1.3);
}

.tips-dot:hover {
    background: #555;
}
