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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #D2B48C, #4682B4, #FF8C00, #32CD32);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Bannière */
.banner {
    width: 100%;
    text-align: center;
    padding: 5px 0;
    background: rgba(455, 455, 455, 0.0);
    backdrop-filter: blur(1px);
}

.banner-image {
    max-width: 100%;
    height: auto;
    max-height: 50%;
}

/* Menu déroulant */
.dropdown-menu {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1001;
}

.menu-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.menu-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background: rgba(70, 130, 180, 0.2);
}

.dropdown-content.show {
    display: block;
}

/* Pages */
.page {
    display: none;
    flex: 1;
    padding: 20px;
}

.page.active {
    display: block;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Titre principal */
.main-title {
    text-align: center;
    color: white;
    font-size: 24px;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-title {
    text-align: center;
    color: white;
    font-size: 20px;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Grille de boutons */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.nav-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-button span {
    font-size: 25px;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: rgba(255, 255, 255, 1);
}

/* Newsletter */
.newsletter-section {
    text-align: center;
    margin: 20px 0;
}

.newsletter-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 15px 30px;
    background: rgba(0,0,0,0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.newsletter-link:hover {
    background: rgba(0,0,0,0.5);
    transform: scale(1.05);
}

/* Calculatrice */
.calculator {
    background: rgba(185, 185, 185, 0.95);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.calculator-display {
    margin-bottom: 10px;
}

#calc-display {
    width: 100%;
    height: 30px;
    font-size: 14px;
    text-align: right;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0 10px;
    background: #f9f9f9;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.calc-btn {
    height: 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f0f0;
    color: #333;
}

.calc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.calc-btn.operator {
    background: #FF8C00;
    color: white;
}

.calc-btn.equals {
    background: #32CD32;
    color: white;
    grid-row: span 2;
}

.calc-btn.clear {
    background: #ff4757;
    color: white;
}

.calc-btn.zero {
    grid-column: span 2;
}

/* Compteur */
.counter-container {
    background: rgba(185, 185, 185, 0.95);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.counter-display {
    font-size: 30px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.counter-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.counter-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.counter-btn.plus {
    background: #32CD32;
    color: white;
}

.counter-btn.minus {
    background: #ff4757;
    color: white;
}

.counter-btn.reset {
    background: #4682B4;
    color: white;
    border-radius: 8px;
    width: 65px;
    height: 35px;
    font-size: 15px;
}

.counter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

/* Convertisseur */
.converter {
    background: rgba(185, 185, 185, 0.95);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 5px;
    box-shadow: 0 8px 8px rgba(0,0,0,0.2);
}

.converter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 5px;
}

.converter-row label {
    font-weight: bold;
    color: #333;
    flex: 1;
}

.converter-row input {
    flex: 1;
    padding: 5px 8px;
    border: 5px solid #ddd;
    border-radius: 5px;
    font-size: 10px;
    text-align: right;
}

.converter-row input:focus {
    outline: none;
    border-color: #4682B4;
}

/* Section PDF */
.pdf-section {
    text-align: center;
    margin: 12px 0;
}

.pdf-link {
    display: block;
    color: yellow;
    font-weight: bold;
    text-decoration: underline;
    font-size: 15px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.table-icon {
    max-width: 180px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.table-icon:hover {
    transform: scale(1.1);
}

/* Liens */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 8px;
    background: rgba(185, 185, 185, 0.9);
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 8px 10px rgba(0,0,0,0.2);
}

.link-item:hover {
    background: rgba(185, 185, 185, 1);
    transform: translateX(5px);
    box-shadow: 0 8px 10px rgba(0,0,0,0.3);
}

.link-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #FFD700;
}

/* Responsive */
@media (max-width: 280px) {
    .container {
        padding: 0 5px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .nav-button {
        padding: 15px;
        font-size: 15px;
    }
    
    .calculator-buttons {
        gap: 5px;
    }
    
    .calc-btn {
        height: 35px;
        font-size: 10px;
    }
    
    .counter-display {
        font-size: 25px;
    }
    
    .converter-row {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .converter-row input {
        text-align: center;
    }
}