* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #FFFC00 0%, #FFE500 50%, #FFF 100%);
    height: 100vh;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 252, 0, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 252, 0, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-5%, -5%) rotate(90deg); }
    50% { transform: translate(-10%, 5%) rotate(180deg); }
    75% { transform: translate(-5%, -10%) rotate(270deg); }
}

.container {
    text-align: center;
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 252, 0, 0.1);
    position: relative;
    z-index: 1;
    animation: containerFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

@keyframes containerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 35px;
    display: block;
    animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 12px rgba(255, 252, 0, 0.3));
    transition: transform 0.3s ease;
    object-fit: contain;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.description {
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 35px;
    padding: 0 10px;
    font-weight: 400;
    opacity: 0.85;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0.85;
        transform: translateY(0);
    }
}

form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(to bottom, #fafafa, #ffffff);
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder {
    color: #aaa;
    font-weight: 400;
    opacity: 0.8;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: #FFFC00;
    background: #fff;
    box-shadow: 0 8px 24px rgba(255, 252, 0, 0.2),
                0 0 0 4px rgba(255, 252, 0, 0.1);
    transform: translateY(-2px);
}

button {
    background: linear-gradient(135deg, #FFFC00 0%, #FFE500 100%);
    color: #000;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(255, 252, 0, 0.3);
    position: relative;
    overflow: hidden;
}

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

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 252, 0, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 252, 0, 0.3);
}

button:disabled {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.message-box {
    background: linear-gradient(135deg, #f8f8f8 0%, #fff 100%);
    padding: 45px 35px 35px 35px;
    border-radius: 25px;
    margin-top: 25px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease;
}

.message-box h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.message-box p {
    color: #555;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 15px;
    font-weight: 400;
}

.message-box.success {
    background: linear-gradient(135deg, #FFFC00 0%, #FFF9CC 50%, #fff 100%);
    box-shadow: 0 12px 40px rgba(255, 252, 0, 0.3),
                inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 60px;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4),
                0 0 0 8px rgba(76, 175, 80, 0.1);
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.timing {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 25px;
    border-radius: 20px;
    margin: 25px 0;
    border: 2px solid rgba(255, 252, 0, 0.3);
    backdrop-filter: blur(10px);
}

.timing strong {
    color: #000;
    font-weight: 700;
}

.info {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    font-weight: 400;
}

.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 18px 20px;
    border-radius: 20px;
    margin-top: 18px;
    border: 2px solid #ef5350;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2);
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.loader {
    margin-top: 25px;
    padding: 30px 25px;
    background: linear-gradient(135deg, #f8f8f8 0%, #fff 100%);
    border-radius: 20px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.4s ease;
}

.loader p {
    color: #666;
    font-size: 15px;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.loader p::after {
    content: '●●●';
    letter-spacing: 4px;
    animation: dots 1.5s steps(4) infinite;
}

@keyframes dots {
    0%, 20% { content: '●'; }
    40% { content: '●●'; }
    60%, 100% { content: '●●●'; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

.snap-badge {
    display: inline-block;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #FFFC00;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #999;
    font-size: 12px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.security-badge::before {
    content: '🔒';
    font-size: 14px;
}

.snap-profile-preview {
    background: linear-gradient(135deg, rgba(255, 252, 0, 0.1) 0%, rgba(255, 252, 0, 0.05) 100%);
    border: 2px solid rgba(255, 252, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.snap-profile-preview:hover {
    border-color: rgba(255, 252, 0, 0.5);
    box-shadow: 0 8px 25px rgba(255, 252, 0, 0.2);
}

.snapcode-container {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.snapcode-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-username {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.5px;
    text-align: center;
    word-break: break-word;
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.button-group .btn {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 150px;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 700;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.open-snapchat-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 5px;
    padding: 15px 35px;
    background: linear-gradient(135deg, #FFFC00 0%, #FFE500 100%);
    color: #000;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 252, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
}

.open-snapchat-btn:hover {
    background: linear-gradient(135deg, #FFE500 0%, #FFD700 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 252, 0, 0.4);
}

@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 480px;
        padding: 45px 35px;
    }
    
    .snap-profile-preview {
        padding: 25px;
        margin: 25px 0;
    }
    
    .snapcode-container {
        width: 180px;
        height: 180px;
    }
    
    .profile-username {
        font-size: 22px;
    }
    
    .button-group .btn {
        max-width: 140px;
        padding: 15px 25px;
    }
}

/* ============================================
   RESPONSIVE MOBILE - REFONTE COMPLETE
   ============================================ */

@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    html {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: -webkit-fill-available;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    body::before {
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .container {
        width: 90vw;
        max-width: 380px;
        max-height: 80vh;
        padding: 60px 40px;
        border-radius: 25px;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    
    h1 {
        margin: 0 0 15px 0;
        font-size: 24px;
        line-height: 1.2;
    }
    
    .logo {
        width: 85px;
        height: 85px;
        margin: 0 auto 20px;
        display: block;
    }
    
    .snap-badge {
        font-size: 10px;
        padding: 6px 16px;
        margin: 0 auto 20px;
        letter-spacing: 1px;
        display: inline-block;
    }
    
    .description {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 25px;
        padding: 0;
    }
    
    input[type="text"],
    input[type="tel"] {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 40px;
        box-sizing: border-box;
    }
    
    button {
        width: 100%;
        padding: 14px 30px;
        font-size: 15px;
        letter-spacing: 0.8px;
        border-radius: 40px;
        box-sizing: border-box;
    }
    
    form {
        gap: 14px;
        width: 100%;
    }
    
    .security-badge {
        font-size: 11px;
        margin-top: 20px;
        margin-bottom: 0;
    }
    
    .message-box {
        padding: 30px 20px;
        margin-top: 0;
        border-radius: 20px;
    }
    
    .message-box h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .message-box p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 48px;
        margin-bottom: 20px;
    }
    
    .timing {
        padding: 15px 18px;
        margin: 18px 0;
        border-radius: 15px;
    }
    
    .loader {
        padding: 20px 18px;
        margin-top: 18px;
        border-radius: 15px;
    }
    
    .loader p {
        font-size: 14px;
    }
    
    .error {
        padding: 14px 18px;
        font-size: 13px;
        margin-top: 15px;
        border-radius: 15px;
    }
    
    .snap-profile-preview {
        padding: 18px;
        margin: 20px 0;
        gap: 14px;
    }
    
    .snapcode-container {
        width: 140px;
        height: 140px;
        padding: 10px;
    }
    
    .profile-username {
        font-size: 18px;
        padding: 0 10px;
        word-break: break-word;
    }
    
    .button-group {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-top: 20px;
        margin-bottom: 0;
        width: 100%;
    }
    
    .button-group .btn {
        flex: 1;
        min-width: 0;
        max-width: none;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ============================================
   PETITS ECRANS (iPhone SE, etc.)
   ============================================ */

@media (max-width: 375px) {
    .container {
        width: 88vw;
        max-width: 340px;
        padding: 30px 20px;
    }
    
    .logo {
        width: 75px;
        height: 75px;
        margin: 0 auto 18px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    input[type="text"],
    input[type="tel"] {
        padding: 13px 18px;
        font-size: 16px;
    }
    
    button {
        padding: 13px 25px;
        font-size: 14px;
    }
    
    .snapcode-container {
        width: 120px;
        height: 120px;
    }
    
    .profile-username {
        font-size: 16px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .button-group .btn {
        width: 100%;
    }
}
    
    .snap-badge {
        font-size: 10px;
        padding: 6px 16px;
        margin: 0 auto 22px;
        letter-spacing: 1px;
    }
    
    .description {
        font-size: 14px;
        margin-bottom: 25px;
        line-height: 1.6;
    }
    
    input[type="text"],
    input[type="tel"] {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    button {
        padding: 15px 35px;
        font-size: 14px;
    }
    
    .message-box {
        padding: 25px 18px;
    }
    
    .message-box h2 {
        font-size: 20px;
    }
    
    .message-box p {
        font-size: 13px;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 42px;
    }
    
    .timing {
        padding: 14px 16px;
    }
    
    .loader {
        padding: 18px 16px;
    }
    
    .snap-profile-preview {
        padding: 15px;
        margin: 20px 0;
        gap: 12px;
    }
    
    .snapcode-container {
        width: 120px;
        height: 120px;
        padding: 8px;
        border-radius: 14px;
    }
    
    .profile-username {
        font-size: 16px;
        padding: 0 5px;
    }
    
    .button-group {
        gap: 10px;
        margin-top: 25px;
        margin-bottom: 0;
        flex-direction: column;
    }
    
    .button-group .btn {
        max-width: 100%;
        width: 100%;
        min-width: auto;
        padding: 13px 18px;
        font-size: 13px;
    }
}

@media (min-width: 769px) {
    body {
        padding: 40px;
    }
    
    .container {
        max-width: 450px;
    }
}
.timing {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.timing strong {
    color: #000;
}

.info {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #c62828;
    font-size: 14px;
}

.loader {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 10px;
}

.loader p {
    color: #666;
    font-size: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        width: 120px;
    }
    
    .description {
        font-size: 13px;
    }
    
    input[type="text"],
    input[type="tel"] {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    button {
        padding: 12px 30px;
        font-size: 14px;
    }
}
